def setUp(self): super(ManageCredentialsMongoDBTestCase, self).setUp() self.database = factory_logical.DatabaseFactory( databaseinfra=self.databaseinfra) self.credential = factory_logical.CredentialFactory( database=self.database) self.driver.create_database(self.database)
def setUp(self): super(ManageCredentialsMongoDBTestCase, self).setUp() self.database = factory_logical.DatabaseFactory( databaseinfra=self.databaseinfra) self.credential = factory_logical.CredentialFactory( database=self.database) self.instance.address = os.getenv('TESTS_MONGODB_HOST', '127.0.0.1') # self.instance.address = '127.0.0.1' self.instance.save() self.driver.create_database(self.database)
def setUp(self): super(ManageCredentialsMySQLTestCase, self).setUp() self.database = factory_logical.DatabaseFactory( databaseinfra=self.databaseinfra, name="test_mysql_credential") # ensures database doest not exists try: self.driver.remove_database(self.database) except: pass self.credential = factory_logical.CredentialFactory( database=self.database) self.driver.create_database(self.database)
def model_create(self): database = factory.DatabaseFactory() database.credentials.all().delete() # delete previous credentials return factory.CredentialFactory(database=database)
def setUp(self): self.databaseinfra = factory_physical.DatabaseInfraFactory() self.database = factory_logical.DatabaseFactory(databaseinfra=self.databaseinfra) self.credential = factory_logical.CredentialFactory(database=self.database) self.driver = MongoDB(databaseinfra=self.databaseinfra)