summaryrefslogtreecommitdiff
path: root/soledad
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2013-08-20 19:35:37 +0200
committerdrebs <drebs@leap.se>2013-08-21 00:25:33 -0300
commitf424e2fee278bd9f3a9fb838025db7d4c1bb44bb (patch)
tree9fd876a598af024e7a016eccbf37b0ca4045dbe7 /soledad
parent23380eb6bd2958ef1f52ddc5aab325d88ecfba78 (diff)
fix tests to dbwrapper removal
Diffstat (limited to 'soledad')
-rw-r--r--soledad/src/leap/soledad/tests/test_soledad.py16
1 files changed, 6 insertions, 10 deletions
diff --git a/soledad/src/leap/soledad/tests/test_soledad.py b/soledad/src/leap/soledad/tests/test_soledad.py
index bdda00bf..531bb572 100644
--- a/soledad/src/leap/soledad/tests/test_soledad.py
+++ b/soledad/src/leap/soledad/tests/test_soledad.py
@@ -58,8 +58,8 @@ class AuxMethodsTestCase(BaseSoledadTest):
sol._gen_secret()
sol._load_secrets()
sol._init_db()
- from leap.soledad.dbwrapper import SQLCipherWrapper
- self.assertIsInstance(sol._db, SQLCipherWrapper)
+ from leap.soledad.sqlcipher import SQLCipherDatabase
+ self.assertIsInstance(sol._db, SQLCipherDatabase)
def test__init_config_defaults(self):
"""
@@ -107,7 +107,6 @@ class AuxMethodsTestCase(BaseSoledadTest):
"""
Test if passphrase can be changed.
"""
- self._soledad.close()
sol = self._soledad_instance(
'leap@leap.se',
passphrase='123',
@@ -118,13 +117,7 @@ class AuxMethodsTestCase(BaseSoledadTest):
# change the passphrase
sol.change_passphrase('654321')
- sol.close()
- # assert we can not use the old passphrase anymore
- # XXX this is failing with the new dbwrapper, and
- # I suspect it has to do with the DatabaseError being
- # raised in the db thread on db init and not properly
- # propagated.
self.assertRaises(
DatabaseError,
self._soledad_instance, 'leap@leap.se',
@@ -132,7 +125,10 @@ class AuxMethodsTestCase(BaseSoledadTest):
prefix=self.rand_prefix)
# use new passphrase and retrieve doc
- sol2 = self._soledad_instance('leap@leap.se', '654321')
+ sol2 = self._soledad_instance(
+ 'leap@leap.se',
+ passphrase='654321',
+ prefix=self.rand_prefix)
doc2 = sol2.get_doc(doc_id)
self.assertEqual(doc, doc2)