Ejemplo n.º 1
0
    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()

        self.assertIsInstance(DjangoAdmin.create_with('/path/to/rsr/virtualenv', '/path/to/rsr',  mock_host_controller), DjangoAdmin)
Ejemplo n.º 2
0
    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()

        self.assertIsInstance(
            DjangoAdmin.create_with('/path/to/rsr/virtualenv', '/path/to/rsr',
                                    mock_host_controller), DjangoAdmin)
Ejemplo n.º 3
0
    def create_with(database_credentials, deployment_host_config, host_controller):
        data_populator_config = RSRDataPopulatorConfig.create_with(deployment_host_config)
        django_admin = DjangoAdmin.create_with(data_populator_config.rsr_env_path, data_populator_config.rsr_deployment_home, host_controller)

        return RSRDataPopulator(data_populator_config,
                                FileSystem(host_controller),
                                LocalFileSystem(),
                                django_admin,
                                DataHandler(database_credentials, host_controller),
                                host_controller.feedback)
Ejemplo n.º 4
0
    def create_with(database_credentials, deployment_host_config,
                    host_controller):
        data_populator_config = RSRDataPopulatorConfig.create_with(
            deployment_host_config)
        django_admin = DjangoAdmin.create_with(
            data_populator_config.rsr_env_path,
            data_populator_config.rsr_deployment_home, host_controller)

        return RSRDataPopulator(
            data_populator_config, FileSystem(host_controller),
            LocalFileSystem(), django_admin,
            DataHandler(database_credentials, host_controller),
            host_controller.feedback)
Ejemplo n.º 5
0
 def create_with(rsr_log_file_path, rsr_env_path, rsr_app_path, host_controller):
     return DjangoSettingsReader(rsr_log_file_path,
                                 FileSystem(host_controller),
                                 DjangoAdmin.create_with(rsr_env_path, rsr_app_path, host_controller))
Ejemplo n.º 6
0
 def create_with(rsr_log_file_path, rsr_env_path, rsr_app_path,
                 host_controller):
     return DjangoSettingsReader(
         rsr_log_file_path, FileSystem(host_controller),
         DjangoAdmin.create_with(rsr_env_path, rsr_app_path,
                                 host_controller))