Mercurial > kallithea
diff rhodecode/tests/functional/test_home.py @ 1788:ef0613584ced beta
test fixes
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Sun, 18 Dec 2011 04:41:52 +0200 |
parents | 605707b50d7c |
children | f467c75544af |
line wrap: on
line diff
--- a/rhodecode/tests/functional/test_home.py Sun Dec 18 04:24:53 2011 +0200 +++ b/rhodecode/tests/functional/test_home.py Sun Dec 18 04:41:52 2011 +0200 @@ -1,22 +1,22 @@ from rhodecode.tests import * + class TestHomeController(TestController): def test_index(self): self.log_user() response = self.app.get(url(controller='home', action='index')) #if global permission is set - self.assertTrue('ADD NEW REPOSITORY' in response.body) - self.assertTrue('href="/%s/summary"' % HG_REPO in response.body) - # Test response... + response.mustcontain('ADD REPOSITORY') + response.mustcontain('href="/%s/summary"' % HG_REPO) - self.assertTrue("""<img class="icon" title="Mercurial repository" """ + response.mustcontain("""<img class="icon" title="Mercurial repository" """ """alt="Mercurial repository" src="/images/icons/hg""" - """icon.png"/>""" in response.body) - self.assertTrue("""<img class="icon" title="public repository" """ + """icon.png"/>""") + response.mustcontain("""<img class="icon" title="public repository" """ """alt="public repository" src="/images/icons/lock_""" - """open.png"/>""" in response.body) - - self.assertTrue("""<a title="Marcin Kuzminski <marcin@python-works.com> -merge" class="tooltip" href="/vcs_test_hg/changeset/27cd5cce30c96924232dffcd24178a07ffeb5dfc">r173:27cd5cce30c9</a>""" - in response.body) + """open.png"/>""") + + response.mustcontain( +"""<a title="Marcin Kuzminski <marcin@python-works.com>:\n +merge" class="tooltip" href="/vcs_test_hg/changeset/27cd5cce30c96924232dffcd24178a07ffeb5dfc">r173:27cd5cce30c9</a>""")