pook
pook copied to clipboard
Add custom matcher functions
A possible interface implementation:
def matcher(request, mock):
return request.url.path == '/v1/foo'
pook.get('api.server.com').match_func(matcher).match_func(matcher)
Overload method for specific matcher function usage:
def json_matcher(body):
return body == '{"foo": true}'
pook.get('api.server.com').body(json_matcher)