Mercurial > bzapi
changeset 17:5e68520b8d1f
added trivial cached search test
author | Atul Varma <varmaa@toolness.com> |
---|---|
date | Wed, 23 Dec 2009 21:33:43 -0800 |
parents | aa2e7f3731c1 |
children | 83690d6db6c2 |
files | test.py |
diffstat | 1 files changed, 11 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/test.py Wed Dec 23 21:25:29 2009 -0800 +++ b/test.py Wed Dec 23 21:33:43 2009 -0800 @@ -77,8 +77,8 @@ 'meh' ) -class ApiTests(unittest.TestCase): - _collections = ['api', 'bugs'] +class _MongoTestCase(unittest.TestCase): + _collections = [] def _reset_collections(self): for name in self._collections: @@ -90,6 +90,15 @@ def tearDown(self): self._reset_collections() +class CachedSearchTests(_MongoTestCase): + _collections = ['bugs'] + + def test_instantiation(self): + search = bzapi.CachedSearch(None, testdb.bugs) + +class ApiTests(_MongoTestCase): + _collections = ['api'] + def _get_basic_fake_api(self, config=FAKE_CONFIG, **kwargs): opener = FakeOpenUrl() opener.set('http://foo/latest/configuration', kwargs,