diff rhodecode/tests/functional/test_search.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 f4ce9416cbd5
children d7488551578e
line wrap: on
line diff
--- a/rhodecode/tests/functional/test_search.py	Sun Mar 31 21:31:36 2013 +0200
+++ b/rhodecode/tests/functional/test_search.py	Sun Mar 31 21:44:27 2013 +0200
@@ -1,6 +1,5 @@
 import os
 from rhodecode.tests import *
-from nose.plugins.skip import SkipTest
 
 
 class TestSearchController(TestController):
@@ -9,8 +8,7 @@
         self.log_user()
         response = self.app.get(url(controller='search', action='index'))
 
-        self.assertTrue('class="small" id="q" name="q" type="text"' in
-                        response.body)
+        response.mustcontain('class="small" id="q" name="q" type="text"')
         # Test response...
 
     def test_empty_search(self):
@@ -20,8 +18,8 @@
             self.log_user()
             response = self.app.get(url(controller='search', action='index'),
                                     {'q': HG_REPO})
-            self.assertTrue('There is no index to search in. '
-                            'Please run whoosh indexer' in response.body)
+            response.mustcontain('There is no index to search in. '
+                                 'Please run whoosh indexer')
 
     def test_normal_search(self):
         self.log_user()