def mock(): pook.activate() yield pook pook.disable()
def test_enable_engine(): pook.get('server.com/foo').reply(204) res = requests.get('http://server.com/foo') assert res.status_code == 204 pook.disable()