diff options
author | drebs <drebs@leap.se> | 2013-02-09 22:09:03 -0200 |
---|---|---|
committer | drebs <drebs@leap.se> | 2013-02-09 22:22:15 -0200 |
commit | 2a1f96729fb694257cab220022ea81731133dca6 (patch) | |
tree | 524ac41103501f45bfb884a5ebe8d3f0f6ccad4f /tests/test_sqlcipher.py | |
parent | d139faf6bb7adcc4ea1e8dcafad38fbeccc552d8 (diff) |
SQLCipher backend can sync with remote Leap HTTP target.
Diffstat (limited to 'tests/test_sqlcipher.py')
-rw-r--r-- | tests/test_sqlcipher.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/test_sqlcipher.py b/tests/test_sqlcipher.py index 38ad09ed..09b76b82 100644 --- a/tests/test_sqlcipher.py +++ b/tests/test_sqlcipher.py @@ -236,7 +236,8 @@ class TestSQLCipherPartialExpandDatabase( db2 = SQLCipherDatabase._open_database( path, PASSWORD, document_factory=TestAlternativeDocument) - self.assertEqual(TestAlternativeDocument, db2._factory) + doc = db2.create_doc({}) + self.assertTrue(isinstance(doc, LeapDocument)) def test_open_database_existing(self): temp_dir = self.createTempDir(prefix='u1db-test-') @@ -252,7 +253,8 @@ class TestSQLCipherPartialExpandDatabase( db2 = SQLCipherDatabase.open_database( path, PASSWORD, create=False, document_factory=TestAlternativeDocument) - self.assertEqual(TestAlternativeDocument, db2._factory) + doc = db2.create_doc({}) + self.assertTrue(isinstance(doc, LeapDocument)) def test_create_database_initializes_schema(self): # This test had to be cloned because our implementation of SQLCipher @@ -304,7 +306,8 @@ class SQLCipherOpen(test_open.TestU1DBOpen): db = u1db_open(self.db_path, password=PASSWORD, create=True, document_factory=TestAlternativeDocument) self.addCleanup(db.close) - self.assertEqual(TestAlternativeDocument, db._factory) + doc = db.create_doc({}) + self.assertTrue(isinstance(doc, LeapDocument)) def test_open_existing(self): db = SQLCipherDatabase(self.db_path, PASSWORD) |