def test_prune_archives_with_verbosity_lots_should_call_attic_with_verbose_parameter(): retention_config = flexmock() flexmock(module).should_receive('_make_prune_flags').with_args(retention_config).and_return( BASE_PRUNE_FLAGS, ) insert_subprocess_mock(PRUNE_COMMAND + ('--verbose', '--stats',)) module.prune_archives( repository='repo', verbosity=VERBOSITY_LOTS, retention_config=retention_config, command='attic', )
def test_prune_archives_should_call_attic_with_parameters(): retention_config = flexmock() flexmock(module).should_receive('_make_prune_flags').with_args(retention_config).and_return( BASE_PRUNE_FLAGS, ) insert_subprocess_mock(PRUNE_COMMAND) module.prune_archives( verbosity=None, repository='repo', retention_config=retention_config, command='attic', )