def test_cleanup_calls_rm(): m = mock.Mock() r = RepoManager(executor=m, tools=[None]) r.to_cleanup = {'repo': '/tmp/a_dir'} r.cleanup() assert m.called_with('rm -rf /tmp/a_dir')
def test_cleanup_doesnt_call_without_clean_files(): m = mock.Mock() r = RepoManager(executor=m, tools=[None]) r.cleanup() assert not m.called