Esempio n. 1
0
    def _can_create_instance_for(self, host_controller_class):
        database_credentials = TemplateLoader.load_database_credentials()

        mock_host_controller = self.mox.CreateMock(host_controller_class)
        mock_host_controller.feedback = self.mock_feedback
        mock_host_controller.sudo('chmod a+w %s' % self.data_retriever_config.rsr_log_file_path)
        self.mox.ReplayAll()

        self.assertIsInstance(RSRDataRetriever.create_with(database_credentials, mock_host_controller), RSRDataRetriever)
    def _can_create_instance_for(self, host_controller_class):
        database_credentials = TemplateLoader.load_database_credentials()

        mock_host_controller = self.mox.CreateMock(host_controller_class)
        mock_host_controller.feedback = self.mock_feedback
        mock_host_controller.sudo('chmod a+w %s' %
                                  self.data_retriever_config.rsr_log_file_path)
        self.mox.ReplayAll()

        self.assertIsInstance(
            RSRDataRetriever.create_with(database_credentials,
                                         mock_host_controller),
            RSRDataRetriever)
Esempio n. 3
0
 def create_with(database_credentials,
                 host_controller=RemoteHostController()):
     return DataRetrievalHost(
         RSRDataRetriever.create_with(database_credentials,
                                      host_controller))
Esempio n. 4
0
 def create_with(database_credentials, host_controller=RemoteHostController()):
     return DataRetrievalHost(RSRDataRetriever.create_with(database_credentials, host_controller))