summaryrefslogtreecommitdiff
path: root/soledad
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2013-08-20 15:52:20 +0200
committerdrebs <drebs@leap.se>2013-08-21 00:25:33 -0300
commitaf456e5640d65fd500e6685527d199a001e4a89c (patch)
tree133b2366c2a30fc8d279adaee5452d4f8a6db9a1 /soledad
parent03d9b34def31a535d4409f57aa08ffb71e741235 (diff)
fixes so we can execute some tests on its own
Diffstat (limited to 'soledad')
-rw-r--r--soledad/src/leap/soledad/tests/u1db_tests/__init__.py7
-rw-r--r--soledad/src/leap/soledad/tests/u1db_tests/test_sync.py6
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))