def test_should_pass_when_everything_works_as_expected(self, mock_config_rpm_maker_class, mock_svn_service_class, mock_exit_program, mock_config, mock_clean_up_deleted_hosts_data): mock_config.return_value = '/path-to-configuration' mock_svn_service_class.return_value = Mock() mock_config_rpm_maker_class.return_value = Mock() building_configuration_rpms_and_clean_host_directories('file:///path_to/testdata/repository', 1)
def test_should_pass_when_everything_works_as_expected( self, mock_config_rpm_maker_class, mock_svn_service_class, mock_exit_program, mock_config, mock_clean_up_deleted_hosts_data): mock_config.return_value = '/path-to-configuration' mock_svn_service_class.return_value = Mock() mock_config_rpm_maker_class.return_value = Mock() building_configuration_rpms_and_clean_host_directories( 'file:///path_to/testdata/repository', 1)
def test_should_clean_up_directories_of_hosts_which_have_been_deleted(self, mock_config_rpm_maker_class, mock_svn_service_constructor, mock_exit_program, mock_config, mock_clean_up_deleted_hosts_data): mock_config.return_value = '/path-to-configuration' mock_svn_service = Mock() mock_svn_service_constructor.return_value = mock_svn_service mock_config_rpm_maker_class.return_value = Mock() building_configuration_rpms_and_clean_host_directories('file:///path_to/testdata/repository', '1980') mock_clean_up_deleted_hosts_data.assert_called_with(mock_svn_service, '1980')
def test_should_initialize_config_rpm_maker_with_given_revision_and_svn_service(self, mock_config_rpm_maker_class, mock_svn_service_constructor, mock_exit_program, mock_config, mock_clean_up_deleted_hosts_data): mock_config.return_value = '/path-to-configuration' mock_svn_service = Mock() mock_svn_service_constructor.return_value = mock_svn_service mock_config_rpm_maker_class.return_value = Mock() building_configuration_rpms_and_clean_host_directories('file:///path_to/testdata/repository', '1980') mock_config_rpm_maker_class.assert_called_with(svn_service=mock_svn_service, revision='1980')
def test_should_initialize_svn_service_with_path_to_config_from_configuration(self, mock_config_rpm_maker_class, mock_svn_service_constructor, mock_exit_program, mock_config, mock_clean_up_deleted_hosts_data): mock_config.return_value = '/path-to-configuration' mock_svn_service_constructor.return_value = Mock() mock_config_rpm_maker_class.return_value = Mock() building_configuration_rpms_and_clean_host_directories('file:///path_to/testdata/repository', 1) mock_svn_service_constructor.assert_called_with(path_to_config='/path-to-configuration', base_url='file:///path_to/testdata/repository')
def test_should_clean_up_directories_of_hosts_which_have_been_deleted( self, mock_config_rpm_maker_class, mock_svn_service_constructor, mock_exit_program, mock_config, mock_clean_up_deleted_hosts_data): mock_config.return_value = '/path-to-configuration' mock_svn_service = Mock() mock_svn_service_constructor.return_value = mock_svn_service mock_config_rpm_maker_class.return_value = Mock() building_configuration_rpms_and_clean_host_directories( 'file:///path_to/testdata/repository', '1980') mock_clean_up_deleted_hosts_data.assert_called_with( mock_svn_service, '1980')
def test_should_initialize_config_rpm_maker_with_given_revision_and_svn_service( self, mock_config_rpm_maker_class, mock_svn_service_constructor, mock_exit_program, mock_config, mock_clean_up_deleted_hosts_data): mock_config.return_value = '/path-to-configuration' mock_svn_service = Mock() mock_svn_service_constructor.return_value = mock_svn_service mock_config_rpm_maker_class.return_value = Mock() building_configuration_rpms_and_clean_host_directories( 'file:///path_to/testdata/repository', '1980') mock_config_rpm_maker_class.assert_called_with( svn_service=mock_svn_service, revision='1980')
def test_should_initialize_svn_service_with_path_to_config_from_configuration( self, mock_config_rpm_maker_class, mock_svn_service_constructor, mock_exit_program, mock_config, mock_clean_up_deleted_hosts_data): mock_config.return_value = '/path-to-configuration' mock_svn_service_constructor.return_value = Mock() mock_config_rpm_maker_class.return_value = Mock() building_configuration_rpms_and_clean_host_directories( 'file:///path_to/testdata/repository', 1) mock_svn_service_constructor.assert_called_with( path_to_config='/path-to-configuration', base_url='file:///path_to/testdata/repository')