diff --git a/rhodecode/tests/functional/test_files.py b/rhodecode/tests/functional/test_files.py --- a/rhodecode/tests/functional/test_files.py +++ b/rhodecode/tests/functional/test_files.py @@ -197,11 +197,13 @@ class TestFilesController(TestController repo_name=HG_REPO, fname=fname)) - assert response.status == '200 OK', 'wrong response code' - assert response.response._headers.items() == [('Pragma', 'no-cache'), - ('Cache-Control', 'no-cache'), - ('Content-Type', '%s; charset=utf-8' % info[0]), - ('Content-Disposition', 'attachment; filename=%s' % filename), ], 'wrong headers' + self.assertEqual(response.status, '200 OK') + self.assertEqual(response.response._headers.items(), + [('Pragma', 'no-cache'), + ('Cache-Control', 'no-cache'), + ('Content-Type', '%s; charset=utf-8' % info[0]), + ('Content-Disposition', 'attachment; filename=%s' % filename),] + ) def test_archival_wrong_ext(self): self.log_user() @@ -212,8 +214,7 @@ class TestFilesController(TestController response = self.app.get(url(controller='files', action='archivefile', repo_name=HG_REPO, fname=fname)) - assert 'Unknown archive type' in response.body - + response.mustcontain('Unknown archive type') def test_archival_wrong_revision(self): self.log_user() @@ -224,7 +225,7 @@ class TestFilesController(TestController response = self.app.get(url(controller='files', action='archivefile', repo_name=HG_REPO, fname=fname)) - assert 'Unknown revision' in response.body + response.mustcontain('Unknown revision') #========================================================================== # RAW FILE @@ -236,8 +237,8 @@ class TestFilesController(TestController revision='27cd5cce30c96924232dffcd24178a07ffeb5dfc', f_path='vcs/nodes.py')) - assert response.content_disposition == "attachment; filename=nodes.py" - assert response.content_type == "text/x-python" + self.assertEqual(response.content_disposition, "attachment; filename=nodes.py") + self.assertEqual(response.content_type, "text/x-python") def test_raw_file_wrong_cs(self): self.log_user() @@ -277,7 +278,7 @@ class TestFilesController(TestController revision='27cd5cce30c96924232dffcd24178a07ffeb5dfc', f_path='vcs/nodes.py')) - assert response.content_type == "text/plain" + self.assertEqual(response.content_type, "text/plain") def test_raw_wrong_cs(self): self.log_user()