Class h.t.TestDatabase(unittest.TestCase):
Part of hypy.test_libView In Hierarchy
Tests HResults, HCondition and HHit. And since you can't test these things without a database, test HDatabase.
| Method | freshenDatabase | Use: |
| Method | test_dbOptimize | Make sure the various optimize flags do not cause a heart attack. |
| Method | test_removeUpdate | Test for document id, update, document removal, len() of database. |
| Method | test_removeURINone | #356253: should be able to explicitly say "uri=None" when calling remove |
| Method | test_removeNulls | Bug 321579: nulls should not kill addText |
| Method | test_putFlags | Tests for put flags, other put-related corner cases. |
| Method | test_condExtras | Tests for search skip, search options, cond on attributes |
| Method | test_dbOpenClosed | Tests for all the db open/close modes |
| Method | test_queries | Test various conditions against an index to make sure search works. |
| Method | test_hits | Poke at the hits returned by a search and see if document data and |
| Method | test_autoflush | Verify that autoflush is not on when it's not turned on, and that |
@contextmanager
def freshenDatabase(self, extras=0):
def freshenDatabase(self, extras=0):
Use:
with self.freshenDatabase() as db:
... stuff that should test using these three documents ...
def
test_removeURINone(self):
#356253: should be able to explicitly say "uri=None" when calling remove
def
test_hits(self):
Poke at the hits returned by a search and see if document data and teaser text come out right.
def
test_autoflush(self):
Verify that autoflush is not on when it's not turned on, and that words are autoindexed when it is turned on