pook icon indicating copy to clipboard operation
pook copied to clipboard

Add custom matcher functions

Open h2non opened this issue 7 years ago • 0 comments

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)

h2non avatar Dec 14 '16 10:12 h2non