Mercurial > kallithea
comparison pylons_app/tests/functional/test_search.py @ 464:cbe777be5b8c
some more basic tests
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Tue, 07 Sep 2010 01:39:12 +0200 |
parents | b153a51b1d3b |
children | e94f4e54dc03 |
comparison
equal
deleted
inserted
replaced
463:a03250279b15 | 464:cbe777be5b8c |
---|---|
1 from pylons_app.tests import * | 1 from pylons_app.tests import * |
2 | 2 |
3 class TestSearchController(TestController): | 3 class TestSearchController(TestController): |
4 | 4 |
5 def test_index(self): | 5 def test_index(self): |
6 self.log_user() | |
6 response = self.app.get(url(controller='search', action='index')) | 7 response = self.app.get(url(controller='search', action='index')) |
8 print response.body | |
9 assert 'class="small" id="q" name="q" type="text"' in response.body,'Search box content error' | |
7 # Test response... | 10 # Test response... |
11 | |
12 def test_empty_search(self): | |
13 self.log_user() | |
14 response = self.app.get(url(controller='search', action='index'),{'q':'vcs_test'}) | |
15 assert 'There is no index to search in. Please run whoosh indexer' in response.body,'No error message about empty index' |