diff options
author | drebs <drebs@leap.se> | 2013-01-24 19:08:54 -0200 |
---|---|---|
committer | drebs <drebs@leap.se> | 2013-01-24 19:08:54 -0200 |
commit | 81d495ba54528ce60cc242be4cbd9e4203efd75c (patch) | |
tree | 5182f5fa2941d8151bae69562445617570b71837 /tests | |
parent | 12bee096d1318511feb19f5256e1cb3d4823c5f5 (diff) |
CouchDatabase refactoring and indexing.
CouchDatabase now inherits from u1db InMemoryDatabase, so it can use all
available facilities. The important thing is to make sure every modification
of logs or indexes gets propagated to the ObjectStore backend.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_couch.py | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/tests/test_couch.py b/tests/test_couch.py index 5e8d6126..9e2f3909 100644 --- a/tests/test_couch.py +++ b/tests/test_couch.py @@ -46,9 +46,10 @@ def copy_couch_database_for_test(test, db): gen, docs = db.get_all_docs(include_deleted=True) for doc in docs: new_db._put_doc(doc) - new_db._transaction_log._data = copy.deepcopy(db._transaction_log._data) - new_db._sync_log._data = copy.deepcopy(db._sync_log._data) - new_db._conflict_log._data = copy.deepcopy(db._conflict_log._data) + new_db._transaction_log = copy.deepcopy(db._transaction_log) + new_db._conflicts = copy.deepcopy(db._conflicts) + new_db._other_generations = copy.deepcopy(db._other_generations) + new_db._indexes = copy.deepcopy(db._indexes) new_db._set_u1db_data() return new_db @@ -112,13 +113,13 @@ class CouchWithConflictsTests( # the server, so indexing makes no sense. Thus, we ignore index testing for # now. -# class CouchIndexTests(DatabaseIndexTests): -# -# scenarios = COUCH_SCENARIOS -# -# def tearDown(self): -# self.db.delete_database() -# super(CouchIndexTests, self).tearDown() +class CouchIndexTests(test_backends.DatabaseIndexTests): + + scenarios = COUCH_SCENARIOS + + def tearDown(self): + self.db.delete_database() + super(CouchIndexTests, self).tearDown() #----------------------------------------------------------------------------- |