Ejemplo n.º 1
0
    def setUp(self):
        super(SQLStatementExecutorTest, self).setUp()
        database_credentials = TemplateLoader.load_database_credentials()
        self.expected_admin_credentials = "--user='******' --password='******'" % (
            database_credentials.admin_user,
            database_credentials.admin_password)

        self.mock_feedback = self.mox.CreateMock(ExecutionFeedback)
        self.mock_host_controller = self.mox.CreateMock(RemoteHostController)
        self.mock_host_controller.feedback = self.mock_feedback

        self.statement_executor = SQLStatementExecutor(
            database_credentials, self.mock_host_controller)
Ejemplo n.º 2
0
 def create_with(database_credentials, host_controller):
     return DatabaseAdminCommand(
         SQLStatementExecutor(database_credentials, host_controller),
         host_controller.feedback)