def _verify_instance_creation_for(self, host_controller_class): mock_host_controller = self.mox.CreateMock(host_controller_class) mock_host_controller.feedback = self.mock_feedback self.mox.ReplayAll() data_populator = RSRDataPopulator.create_with(TemplateLoader.load_database_credentials(), self.deployment_host_config, mock_host_controller) self.assertIsInstance(data_populator, RSRDataPopulator)
def create_with(database_credentials, deployment_host_config, host_controller): return DatabaseAdmin( DatabaseAdminCommand.create_with(database_credentials, host_controller), DatabaseCopier(database_credentials, host_controller), RSRDataPopulator.create_with(database_credentials, deployment_host_config, host_controller), TimeStampFormatter(), host_controller.feedback)
def _verify_instance_creation_for(self, host_controller_class): mock_host_controller = self.mox.CreateMock(host_controller_class) mock_host_controller.feedback = self.mock_feedback self.mox.ReplayAll() data_populator = RSRDataPopulator.create_with( TemplateLoader.load_database_credentials(), self.deployment_host_config, mock_host_controller) self.assertIsInstance(data_populator, RSRDataPopulator)
def create_with(database_credentials, deployment_host_config, host_controller): return DatabaseAdmin(DatabaseAdminCommand.create_with(database_credentials, host_controller), DatabaseCopier(database_credentials, host_controller), RSRDataPopulator.create_with(database_credentials, deployment_host_config, host_controller), TimeStampFormatter(), host_controller.feedback)