diff rhodecode/tests/functional/test_search.py @ 2451:402a96fcfa22 beta

Added vcs testsuite for better integration tests + added fetching of two new repos into test env for rhodecode
author Marcin Kuzminski <marcin@python-works.com>
date Wed, 13 Jun 2012 23:27:33 +0200
parents b7563ad4e7ee
children 9492ab68331f
line wrap: on
line diff
--- a/rhodecode/tests/functional/test_search.py	Wed Jun 13 21:48:00 2012 +0200
+++ b/rhodecode/tests/functional/test_search.py	Wed Jun 13 23:27:33 2012 +0200
@@ -2,6 +2,7 @@
 import os
 from nose.plugins.skip import SkipTest
 
+
 class TestSearchController(TestController):
 
     def test_index(self):
@@ -18,20 +19,21 @@
         else:
             self.log_user()
             response = self.app.get(url(controller='search', action='index'),
-                                    {'q':HG_REPO})
+                                    {'q': HG_REPO})
             self.assertTrue('There is no index to search in. '
                             'Please run whoosh indexer' in response.body)
 
     def test_normal_search(self):
         self.log_user()
         response = self.app.get(url(controller='search', action='index'),
-                                {'q':'def repo'})
-        self.assertTrue('10 results' in response.body)
-        self.assertTrue('Permission denied' not in response.body)
+                                {'q': 'def repo'})
+        response.mustcontain('10 results')
+        response.mustcontain('Permission denied')
 
     def test_repo_search(self):
         self.log_user()
         response = self.app.get(url(controller='search', action='index'),
-                                {'q':'repository:%s def test' % HG_REPO})
-        self.assertTrue('4 results' in response.body)
-        self.assertTrue('Permission denied' not in response.body)
+                                {'q': 'repository:%s def test' % HG_REPO})
+
+        response.mustcontain('4 results')
+        response.mustcontain('Permission denied')