def test_can_create_instance(self): """fab.tests.config.rsr.virtualenv_installer_config_test Can create RSRVirtualEnvInstallerConfig instance""" self.assertIsInstance( RSRVirtualEnvInstallerConfig.create_with( self.deployment_host_config, self.deployment_user), RSRVirtualEnvInstallerConfig)
def setUp(self): super(RebuildRSREnvTest, self).setUp() self.virtualenv_installer_config = RSRVirtualEnvInstallerConfig.create_with(CIDeploymentHostConfig.for_test(), User.CURRENT) self.mock_virtualenv_deployment_host = self.mox.CreateMock(VirtualEnvDeploymentHost) self.rebuild_virtualenv_task = StubbedRebuildRSREnv(self.mock_virtualenv_deployment_host)
def setUp(self): super(RebuildRSREnvTest, self).setUp() self.virtualenv_installer_config = RSRVirtualEnvInstallerConfig.create_with( CIDeploymentHostConfig.for_test(), User.CURRENT) self.mock_virtualenv_deployment_host = self.mox.CreateMock( VirtualEnvDeploymentHost) self.rebuild_virtualenv_task = StubbedRebuildRSREnv( self.mock_virtualenv_deployment_host)
def setUp(self): super(VirtualEnvInstallerTest, self).setUp() self.mock_host_controller = self.mox.CreateMock(RemoteHostController) self.mock_file_system = self.mox.CreateMock(FileSystem) self.mock_permissions = self.mox.CreateMock(AkvoPermissions) self.mock_internet = self.mox.CreateMock(Internet) self.mock_virtualenv = self.mox.CreateMock(VirtualEnv) self.mock_feedback = self.mox.CreateMock(ExecutionFeedback) self.mock_time_stamp_formatter = self.mox.CreateMock(TimeStampFormatter) self.virtualenv_installer_config = RSRVirtualEnvInstallerConfig.create_with(CIDeploymentHostConfig.for_test(), "deployment_user") self.pip_requirements_url = "http://some/path/to/pip_requirements.txt" self.mock_host_controller.feedback = self.mock_feedback self.virtualenv_installer = VirtualEnvInstaller(self.virtualenv_installer_config, self.mock_host_controller, self.mock_file_system, self.mock_permissions, self.mock_internet, self.mock_virtualenv, self.mock_time_stamp_formatter)
def setUp(self): super(VirtualEnvDeploymentHostTest, self).setUp() self.mock_file_system = self.mox.CreateMock(FileSystem) self.mock_user_verifier = self.mox.CreateMock(DeploymentUserVerifier) self.mock_permissions = self.mox.CreateMock(AkvoPermissions) self.mock_virtualenv_installer = self.mox.CreateMock(VirtualEnvInstaller) self.mock_feedback = self.mox.CreateMock(ExecutionFeedback) self.deployment_user = "******" deployment_host_config = CIDeploymentHostConfig.for_test() self.virtualenv_installer_config = RSRVirtualEnvInstallerConfig.create_with(deployment_host_config, self.deployment_user) # we don't have any additional expections on the Internet dependency (since this is already # tested in the DeploymentHost base class) so we set this to None for now self.virtualenv_deployment_host = VirtualEnvDeploymentHost(self.virtualenv_installer_config, self.mock_file_system, self.mock_user_verifier, self.mock_permissions, None, self.mock_virtualenv_installer, self.mock_feedback)
def setUp(self): super(VirtualEnvInstallerTest, self).setUp() self.mock_host_controller = self.mox.CreateMock(RemoteHostController) self.mock_file_system = self.mox.CreateMock(FileSystem) self.mock_permissions = self.mox.CreateMock(AkvoPermissions) self.mock_internet = self.mox.CreateMock(Internet) self.mock_virtualenv = self.mox.CreateMock(VirtualEnv) self.mock_feedback = self.mox.CreateMock(ExecutionFeedback) self.mock_time_stamp_formatter = self.mox.CreateMock( TimeStampFormatter) self.virtualenv_installer_config = RSRVirtualEnvInstallerConfig.create_with( CIDeploymentHostConfig.for_test(), "deployment_user") self.pip_requirements_url = "http://some/path/to/pip_requirements.txt" self.mock_host_controller.feedback = self.mock_feedback self.virtualenv_installer = VirtualEnvInstaller( self.virtualenv_installer_config, self.mock_host_controller, self.mock_file_system, self.mock_permissions, self.mock_internet, self.mock_virtualenv, self.mock_time_stamp_formatter)
def test_can_create_instance(self): """fab.tests.config.rsr.virtualenv_installer_config_test Can create RSRVirtualEnvInstallerConfig instance""" self.assertIsInstance(RSRVirtualEnvInstallerConfig.create_with(self.deployment_host_config, self.deployment_user), RSRVirtualEnvInstallerConfig)