Ejemplo n.º 1
0
 def test__open_database_with_factory(self):
     temp_dir = self.createTempDir(prefix='u1db-test-')
     path = temp_dir + '/test.sqlite'
     SQLCipherDatabase(path, PASSWORD)
     db2 = SQLCipherDatabase._open_database(
         path, PASSWORD,
         document_factory=TestAlternativeDocument)
     doc = db2.create_doc({})
     self.assertTrue(isinstance(doc, SoledadDocument))
Ejemplo n.º 2
0
 def test__open_database(self):
     temp_dir = self.createTempDir(prefix='u1db-test-')
     path = temp_dir + '/test.sqlite'
     SQLCipherDatabase(path, PASSWORD)
     db2 = SQLCipherDatabase._open_database(path, PASSWORD)
     self.assertIsInstance(db2, SQLCipherDatabase)