Skip to content

Add custom matcher functions #34

Open

Description

@h2non

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)

Activity

  1. added this to the 0.1.6 milestone on Dec 14, 2016
  2. self-assigned this
    on Dec 14, 2016
  3. modified the milestones: 0.2.0, 0.1.6 on Jan 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions