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
@@ -6,6 +6,7 @@ ARCHIVE_SPECS = {
'.zip': ('application/zip', 'zip', ''),
}
+
class TestFilesController(TestController):
def test_index(self):
@@ -15,32 +16,29 @@ class TestFilesController(TestController
revision='tip',
f_path='/'))
# Test response...
- assert 'docs' in response.body, 'missing dir'
- assert 'tests' in response.body, 'missing dir'
- assert 'vcs' in response.body, 'missing dir'
- assert '.hgignore' in response.body, 'missing file'
- assert 'MANIFEST.in' in response.body, 'missing file'
-
+ response.mustcontain('docs')
+ response.mustcontain('tests')
+ response.mustcontain('vcs')
+ response.mustcontain('.hgignore')
+ response.mustcontain('MANIFEST.in')
def test_index_revision(self):
self.log_user()
- response = self.app.get(url(controller='files', action='index',
- repo_name=HG_REPO,
- revision='7ba66bec8d6dbba14a2155be32408c435c5f4492',
- f_path='/'))
-
-
+ response = self.app.get(
+ url(controller='files', action='index',
+ repo_name=HG_REPO,
+ revision='7ba66bec8d6dbba14a2155be32408c435c5f4492',
+ f_path='/')
+ )
#Test response...
- assert 'docs' in response.body, 'missing dir'
- assert 'tests' in response.body, 'missing dir'
- assert 'README.rst' in response.body, 'missing file'
- assert '1.1 KiB' in response.body, 'missing size of setup.py'
- assert 'text/x-python' in response.body, 'missing mimetype of setup.py'
-
-
+ response.mustcontain('docs')
+ response.mustcontain('tests')
+ response.mustcontain('README.rst')
+ response.mustcontain('1.1 KiB')
+ response.mustcontain('text/x-python')
def test_index_different_branch(self):
self.log_user()
@@ -50,11 +48,7 @@ class TestFilesController(TestController
revision='97e8b885c04894463c51898e14387d80c30ed1ee',
f_path='/'))
-
-
- assert """branch: git""" in response.body, 'missing or wrong branch info'
-
-
+ response.mustcontain("""branch: git""")
def test_index_paging(self):
self.log_user()
@@ -70,7 +64,7 @@ class TestFilesController(TestController
revision=r[1],
f_path='/'))
- assert """@ r%s:%s""" % (r[0], r[1][:12]) in response.body, 'missing info about current revision'
+ response.mustcontain("""@ r%s:%s""" % (r[0], r[1][:12]))
def test_file_source(self):
self.log_user()
@@ -80,40 +74,40 @@ class TestFilesController(TestController
f_path='vcs/nodes.py'))
#test or history
- assert """""")
-
- assert """
Partially implemented #16. filecontent/commit message/author/node name are safe_unicode now.
+ response.mustcontain("""
Partially implemented #16. filecontent/commit message/author/node name are safe_unicode now.
In addition some other __str__ are unicode as well
Added test for unicode
Improved test to clone into uniq repository.
-removed extra unicode conversion in diff.
""" in response.body
+removed extra unicode conversion in diff.
""")
- assert """branch: default""" in response.body, 'missing or wrong branch info'
+ response.mustcontain("""branch: default""")
def test_file_annotation(self):
self.log_user()
@@ -144,41 +137,41 @@ removed extra unicode conversion in diff
revision='27cd5cce30c96924232dffcd24178a07ffeb5dfc',
f_path='vcs/nodes.py'))
- print response.body
- assert """