##// END OF EJS Templates
fixed tests for search...
marcink -
r2644:bed929b2 beta
parent child Browse files
Show More
@@ -27,7 +27,7 class TestSearchController(TestControlle
27 self.log_user()
27 self.log_user()
28 response = self.app.get(url(controller='search', action='index'),
28 response = self.app.get(url(controller='search', action='index'),
29 {'q': 'def repo'})
29 {'q': 'def repo'})
30 response.mustcontain('10 results')
30 response.mustcontain('39 results')
31
31
32 def test_repo_search(self):
32 def test_repo_search(self):
33 self.log_user()
33 self.log_user()
@@ -41,13 +41,24 class TestSearchController(TestControlle
41 response = self.app.get(url(controller='search', action='index'),
41 response = self.app.get(url(controller='search', action='index'),
42 {'q': 'last:t', 'type': 'commit'})
42 {'q': 'last:t', 'type': 'commit'})
43
43
44 response.mustcontain('1 results')
44 response.mustcontain('2 results')
45
45
46 def test_search_commit_message(self):
46 def test_search_commit_message(self):
47 self.log_user()
47 self.log_user()
48 response = self.app.get(url(controller='search', action='index'),
48 response = self.app.get(url(controller='search', action='index'),
49 {'q': 'bother to ask where to fetch repo during tests',
49 {'q': 'bother to ask where to fetch repo during tests',
50 'type': 'commit'})
50 'type': 'commit'})
51
52 response.mustcontain('2 results')
53 response.mustcontain('a00c1b6f5d7a6ae678fd553a8b81d92367f7ecf1')
54 response.mustcontain('c6eb379775c578a95dad8ddab53f963b80894850')
55
56 def test_search_commit_message_hg_repo(self):
57 self.log_user()
58 response = self.app.get(url(controller='search', action='index',
59 search_repo=HG_REPO),
60 {'q': 'bother to ask where to fetch repo during tests',
61 'type': 'commit'})
51
62
52 response.mustcontain('1 results')
63 response.mustcontain('1 results')
53 response.mustcontain('a00c1b6f5d7a6ae678fd553a8b81d92367f7ecf1')
64 response.mustcontain('a00c1b6f5d7a6ae678fd553a8b81d92367f7ecf1')
@@ -66,13 +77,16 class TestSearchController(TestControlle
66 {'q': 'added:README.rst',
77 {'q': 'added:README.rst',
67 'type': 'commit'})
78 'type': 'commit'})
68
79
69 response.mustcontain('1 results')
80 response.mustcontain('2 results')
81 #HG
70 response.mustcontain('3803844fdbd3b711175fc3da9bdacfcd6d29a6fb')
82 response.mustcontain('3803844fdbd3b711175fc3da9bdacfcd6d29a6fb')
83 #GIT
84 response.mustcontain('ff7ca51e58c505fec0dd2491de52c622bb7a806b')
71
85
72 def test_search_author(self):
86 def test_search_author(self):
73 self.log_user()
87 self.log_user()
74 response = self.app.get(url(controller='search', action='index'),
88 response = self.app.get(url(controller='search', action='index'),
75 {'q': 'author:marcin@python-blog.com raw_id:b986218ba1c9b0d6a259fac9b050b1724ed8e545',
89 {'q': 'author:marcin@python-blog.com raw_id:b986218ba1c9b0d6a259fac9b050b1724ed8e545',
76 'type': 'commit'})
90 'type': 'commit'})
77
91
78 response.mustcontain('1 results')
92 response.mustcontain('1 results')
General Comments 0
You need to be logged in to leave comments. Login now