def setUp(self): self._provisioning_engine = provision.get_engine( utils.get_connect_string(backend=self.DRIVER, user=self.USERNAME, passwd=self.PASSWORD, database=self.DBNAME)) self._uri = provision.create_database(self._provisioning_engine) super(OpportunisticFixture, self).setUp()
def setUp(self): self._provisioning_engine = provision.get_engine( utils.get_connect_string(backend=self.DRIVER, user=self.USERNAME, passwd=self.PASSWORD, database=self.DBNAME) ) self._uri = provision.create_database(self._provisioning_engine) super(OpportunisticFixture, self).setUp()
def test_connect_string_sqlite(self): sqlite_credentials = {'backend': 'sqlite', 'database': 'test.db'} connect_string = utils.get_connect_string(**sqlite_credentials) self.assertEqual(connect_string, 'sqlite:///test.db')
def test_connect_string(self): connect_string = utils.get_connect_string(**self.full_credentials) self.assertEqual(connect_string, self.connect_string)
def _get_uri(self): return utils.get_connect_string(backend=self.DRIVER, user=self.USERNAME, passwd=self.PASSWORD, database=self.DBNAME)