changeset 1788:ef0613584ced beta

test fixes
author Marcin Kuzminski <marcin@python-works.com>
date Sun, 18 Dec 2011 04:41:52 +0200
parents d4a7b6c82efe
children 17caf4efe15c
files rhodecode/templates/changeset/changeset_file_comment.html rhodecode/tests/functional/test_branches.py rhodecode/tests/functional/test_home.py rhodecode/tests/functional/test_tags.py
diffstat 4 files changed, 21 insertions(+), 22 deletions(-) [+]
line wrap: on
line diff
--- a/rhodecode/templates/changeset/changeset_file_comment.html	Sun Dec 18 04:24:53 2011 +0200
+++ b/rhodecode/templates/changeset/changeset_file_comment.html	Sun Dec 18 04:41:52 2011 +0200
@@ -88,7 +88,7 @@
     %endfor        
     
     %for co in c.comments:
-        ${comment.comment_block(co)}
+        ${comment_block(co)}
     %endfor
     %if c.rhodecode_user.username != 'default':
     <div class="comment-form">
--- a/rhodecode/tests/functional/test_branches.py	Sun Dec 18 04:24:53 2011 +0200
+++ b/rhodecode/tests/functional/test_branches.py	Sun Dec 18 04:41:52 2011 +0200
@@ -6,10 +6,9 @@
         self.log_user()
         response = self.app.get(url(controller='branches',
                                     action='index', repo_name=HG_REPO))
-
-        self.assertTrue("""<a href="/%s/changeset/27cd5cce30c96924232dffcd24178a07ffeb5dfc">default</a>""" % HG_REPO in response.body)
-        self.assertTrue("""<a href="/%s/changeset/97e8b885c04894463c51898e14387d80c30ed1ee">git</a>""" % HG_REPO in response.body)
-        self.assertTrue("""<a href="/%s/changeset/2e6a2bf9356ca56df08807f4ad86d480da72a8f4">web</a>""" % HG_REPO in response.body)
+        response.mustcontain("""<a href="/%s/files/27cd5cce30c96924232dffcd24178a07ffeb5dfc/">default</a>""" % HG_REPO)
+        response.mustcontain("""<a href="/%s/files/97e8b885c04894463c51898e14387d80c30ed1ee/">git</a>""" % HG_REPO)
+        response.mustcontain("""<a href="/%s/files/2e6a2bf9356ca56df08807f4ad86d480da72a8f4/">web</a>""" % HG_REPO)
 
 
 
--- 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 &lt;marcin@python-works.com&gt;
-merge" class="tooltip" href="/vcs_test_hg/changeset/27cd5cce30c96924232dffcd24178a07ffeb5dfc">r173:27cd5cce30c9</a>"""
-                            in response.body)
+                        """open.png"/>""")
+
+        response.mustcontain(
+"""<a title="Marcin Kuzminski &lt;marcin@python-works.com&gt;:\n
+merge" class="tooltip" href="/vcs_test_hg/changeset/27cd5cce30c96924232dffcd24178a07ffeb5dfc">r173:27cd5cce30c9</a>""")
--- a/rhodecode/tests/functional/test_tags.py	Sun Dec 18 04:24:53 2011 +0200
+++ b/rhodecode/tests/functional/test_tags.py	Sun Dec 18 04:41:52 2011 +0200
@@ -5,9 +5,9 @@
     def test_index(self):
         self.log_user()
         response = self.app.get(url(controller='tags', action='index', repo_name=HG_REPO))
-        assert """<a href="/%s/changeset/27cd5cce30c96924232dffcd24178a07ffeb5dfc">tip</a>""" % HG_REPO in response.body, 'wrong info about tip tag'
-        assert """<a href="/%s/changeset/fd4bdb5e9b2a29b4393a4ac6caef48c17ee1a200">0.1.4</a>""" % HG_REPO in response.body, 'wrong info about 0.1.4 tag'
-        assert """<a href="/%s/changeset/17544fbfcd33ffb439e2b728b5d526b1ef30bfcf">0.1.3</a>""" % HG_REPO in response.body, 'wrong info about 0.1.3 tag'
-        assert """<a href="/%s/changeset/a7e60bff65d57ac3a1a1ce3b12a70f8a9e8a7720">0.1.2</a>""" % HG_REPO in response.body, 'wrong info about 0.1.2 tag'
-        assert """<a href="/%s/changeset/eb3a60fc964309c1a318b8dfe26aa2d1586c85ae">0.1.1</a>""" % HG_REPO in response.body, 'wrong info about 0.1.1 tag'
-        # Test response...
+        response.mustcontain("""<a href="/%s/files/27cd5cce30c96924232dffcd24178a07ffeb5dfc/">tip</a>""" % HG_REPO)
+        response.mustcontain("""<a href="/%s/files/fd4bdb5e9b2a29b4393a4ac6caef48c17ee1a200/">0.1.4</a>""" % HG_REPO)
+        response.mustcontain("""<a href="/%s/files/17544fbfcd33ffb439e2b728b5d526b1ef30bfcf/">0.1.3</a>""" % HG_REPO)
+        response.mustcontain("""<a href="/%s/files/a7e60bff65d57ac3a1a1ce3b12a70f8a9e8a7720/">0.1.2</a>""" % HG_REPO)
+        response.mustcontain("""<a href="/%s/files/eb3a60fc964309c1a318b8dfe26aa2d1586c85ae/">0.1.1</a>""" % HG_REPO)
+