import os
from .cassette import Cassette
from .serializers import yamlserializer, jsonserializer
-from .matchers import method, url, host, path, headers, body
+from . import matchers
class VCR(object):
serializer='yaml',
cassette_library_dir=None,
record_mode="once",
- match_on=['method', 'host', 'port', 'path', 'query'],
filter_headers=[],
filter_query_parameters=[],
before_record=None,
+ match_on=[
+ 'method',
+ 'scheme',
+ 'host',
+ 'port',
+ 'path',
+ 'query',
+ ],
):
self.serializer = serializer
self.match_on = match_on
'json': jsonserializer,
}
self.matchers = {
- 'method': method,
- 'url': url,
- 'host': host,
- 'port': method,
- 'path': path,
- 'query': path,
- 'headers': headers,
- 'body': body,
+ 'method': matchers.method,
+ 'url': matchers.url,
+ 'scheme': matchers.scheme,
+ 'host': matchers.host,
+ 'port': matchers.method,
+ 'path': matchers.path,
+ 'query': matchers.path,
+ 'headers': matchers.headers,
+ 'body': matchers.body,
}
self.record_mode = record_mode
self.filter_headers = filter_headers