diff options
Diffstat (limited to 'soledad/src/leap')
-rw-r--r-- | soledad/src/leap/soledad/tests/u1db_tests/__init__.py | 7 | ||||
-rw-r--r-- | soledad/src/leap/soledad/tests/u1db_tests/test_sync.py | 6 |
2 files changed, 10 insertions, 3 deletions
diff --git a/soledad/src/leap/soledad/tests/u1db_tests/__init__.py b/soledad/src/leap/soledad/tests/u1db_tests/__init__.py index 43304b43..3bc12487 100644 --- a/soledad/src/leap/soledad/tests/u1db_tests/__init__.py +++ b/soledad/src/leap/soledad/tests/u1db_tests/__init__.py @@ -189,8 +189,11 @@ class DatabaseBaseTests(TestCase): scenarios = LOCAL_DATABASES_SCENARIOS - def create_database(self, replica_uid): - return self.make_database_for_test(self, replica_uid) + def make_database_for_test(self, replica_uid): + return make_memory_database_for_test(self, replica_uid) + + def create_database(self, *args): + return self.make_database_for_test(self, *args) def copy_database(self, db): # DO NOT COPY OR REUSE THIS CODE OUTSIDE TESTS: COPYING U1DB DATABASES diff --git a/soledad/src/leap/soledad/tests/u1db_tests/test_sync.py b/soledad/src/leap/soledad/tests/u1db_tests/test_sync.py index 96aa2736..a87c1787 100644 --- a/soledad/src/leap/soledad/tests/u1db_tests/test_sync.py +++ b/soledad/src/leap/soledad/tests/u1db_tests/test_sync.py @@ -85,7 +85,8 @@ class DatabaseSyncTargetTests(tests.DatabaseBaseTests, whitebox = True def setUp(self): - super(DatabaseSyncTargetTests, self).setUp() + tests.DatabaseBaseTests.setUp(self) + tests.TestCaseWithServer.setUp(self) self.db, self.st = self.create_db_and_target(self) self.other_changes = [] @@ -96,6 +97,9 @@ class DatabaseSyncTargetTests(tests.DatabaseBaseTests, del self.db super(DatabaseSyncTargetTests, self).tearDown() + def create_db_and_target(self, *args): + return _make_local_db_and_target(*args) + def receive_doc(self, doc, gen, trans_id): self.other_changes.append( (doc.doc_id, doc.rev, doc.get_json(), gen, trans_id)) |