コード例 #1
0
    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()
コード例 #2
0
    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()
コード例 #3
0
 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')
コード例 #4
0
 def test_connect_string(self):
     connect_string = utils.get_connect_string(**self.full_credentials)
     self.assertEqual(connect_string, self.connect_string)
コード例 #5
0
 def _get_uri(self):
     return utils.get_connect_string(backend=self.DRIVER,
                                     user=self.USERNAME,
                                     passwd=self.PASSWORD,
                                     database=self.DBNAME)