Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add custom matcher functions #34

Open
h2non opened this issue Dec 14, 2016 · 0 comments
Open

Add custom matcher functions #34

h2non opened this issue Dec 14, 2016 · 0 comments
Assignees
Milestone

Comments

@h2non
Copy link
Owner

h2non commented Dec 14, 2016

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 h2non added this to the 0.1.6 milestone Dec 14, 2016
@h2non h2non self-assigned this Dec 14, 2016
@h2non h2non modified the milestones: 0.2.0, 0.1.6 Jan 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant