Esempio n. 1
0
 def test_set_database_uri(self):
     adapter = SQLStorageAdapter(database_uri='sqlite:///db.sqlite3')
     self.assertEqual(adapter.database_uri, 'sqlite:///db.sqlite3')
Esempio n. 2
0
 def setUpClass(cls):
     """
     Instantiate the adapter before any tests in the test case run.
     """
     cls.adapter = SQLStorageAdapter()
Esempio n. 3
0
 def test_set_database_uri_none(self):
     adapter = SQLStorageAdapter(database_uri=None)
     self.assertEqual(adapter.database_uri, 'sqlite://')
 def test_set_database_name(self):
     adapter = SQLStorageAdapter(database='test.sqlite3')
     self.assertEqual(adapter.database_uri, 'sqlite:///test.sqlite3')