summaryrefslogtreecommitdiff
path: root/src/leap/soledad/tests/test_couch.py
diff options
context:
space:
mode:
authordrebs <drebs@leap.se>2013-01-10 13:18:48 -0200
committerdrebs <drebs@leap.se>2013-01-10 13:18:48 -0200
commit8909a16a12c17098ae8d5ecd31af6765b543622c (patch)
treed336abb73dbd96edd5a80f9e16f3d26bac6cd79f /src/leap/soledad/tests/test_couch.py
parent9b7728b80027f35c013a449b884235cf8eac503c (diff)
CouchDatabase passes all relevant u1db tests.
Diffstat (limited to 'src/leap/soledad/tests/test_couch.py')
-rw-r--r--src/leap/soledad/tests/test_couch.py62
1 files changed, 33 insertions, 29 deletions
diff --git a/src/leap/soledad/tests/test_couch.py b/src/leap/soledad/tests/test_couch.py
index 3f6c45f6..2337be9b 100644
--- a/src/leap/soledad/tests/test_couch.py
+++ b/src/leap/soledad/tests/test_couch.py
@@ -40,7 +40,7 @@ class TestCouchBackendImpl(tests.TestCase):
# The following tests come from `u1db.tests.test_backends`.
#-----------------------------------------------------------------------------
-def make_couch_database_for_test(test, replica_uid, path='test'):
+def make_couch_database_for_test(test, replica_uid):
return couch.CouchDatabase('http://localhost:5984', 'u1db_tests',
replica_uid=replica_uid)
@@ -81,40 +81,44 @@ class CouchDatabaseTests(LocalDatabaseTests):
super(CouchDatabaseTests, self).tearDown()
-#class CouchValidateGenNTransIdTests(LocalDatabaseValidateGenNTransIdTests):
-#
-# scenarios = COUCH_SCENARIOS
-#
-# def tearDown(self):
-# self.db.delete_database()
-# super(CouchTests, self).tearDown()
-#
-#
-#class CouchValidateSourceGenTests(LocalDatabaseValidateSourceGenTests):
-#
-# scenarios = COUCH_SCENARIOS
-#
-# def tearDown(self):
-# self.db.delete_database()
-# super(CouchTests, self).tearDown()
-#
-#
-#class CouchWithConflictsTests(LocalDatabaseWithConflictsTests):
-#
-# scenarios = COUCH_SCENARIOS
-#
-# def tearDown(self):
-# self.db.delete_database()
-# super(CouchTests, self).tearDown()
-#
-#
+class CouchValidateGenNTransIdTests(LocalDatabaseValidateGenNTransIdTests):
+
+ scenarios = COUCH_SCENARIOS
+
+ def tearDown(self):
+ self.db.delete_database()
+ super(CouchValidateGenNTransIdTests, self).tearDown()
+
+
+class CouchValidateSourceGenTests(LocalDatabaseValidateSourceGenTests):
+
+ scenarios = COUCH_SCENARIOS
+
+ def tearDown(self):
+ self.db.delete_database()
+ super(CouchValidateSourceGenTests, self).tearDown()
+
+
+class CouchWithConflictsTests(LocalDatabaseWithConflictsTests):
+
+ scenarios = COUCH_SCENARIOS
+
+ def tearDown(self):
+ self.db.delete_database()
+ super(CouchWithConflictsTests, self).tearDown()
+
+
+# Notice: the CouchDB backend is currently used for storing encrypted data in
+# 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(CouchTests, self).tearDown()
+# super(CouchIndexTests, self).tearDown()
#
load_tests = tests.load_with_scenarios