def test_run_hooks(): hooks = str(Path(HERE, "data", "hook.py")) env = MachEnvironment(mock.MagicMock(), hooks=hooks) assert env.run_hook("doit") == "OK"
def test_run_hooks_url(): hooks = "http://somewhere/hooks.py" env = MachEnvironment(mock.MagicMock(), hooks=hooks) assert env.run_hook("doit") == "OK"