diff rhodecode/tests/functional/test_followers.py @ 3646:63e49418a4cc beta

Use only mustcontain for testing response body
author Marcin Kuzminski <marcin@python-works.com>
date Sun, 31 Mar 2013 21:44:27 +0200
parents f9559677c953
children 7e5f8c12a3fc
line wrap: on
line diff
--- a/rhodecode/tests/functional/test_followers.py	Sun Mar 31 21:31:36 2013 +0200
+++ b/rhodecode/tests/functional/test_followers.py	Sun Mar 31 21:44:27 2013 +0200
@@ -1,13 +1,24 @@
 from rhodecode.tests import *
 
+
 class TestFollowersController(TestController):
 
-    def test_index(self):
+    def test_index_hg(self):
         self.log_user()
         repo_name = HG_REPO
         response = self.app.get(url(controller='followers',
                                     action='followers',
                                     repo_name=repo_name))
 
-        self.assertTrue("""test_admin""" in response.body)
-        self.assertTrue("""Started following""" in response.body)
+        response.mustcontain("""test_admin""")
+        response.mustcontain("""Started following""")
+
+    def test_index_git(self):
+        self.log_user()
+        repo_name = GIT_REPO
+        response = self.app.get(url(controller='followers',
+                                    action='followers',
+                                    repo_name=repo_name))
+
+        response.mustcontain("""test_admin""")
+        response.mustcontain("""Started following""")