mirror of
https://github.com/kevin1024/vcrpy.git
synced 2025-12-10 01:25:34 +00:00
Replaced 'url' mather with 'uri'.
This commit is contained in:
@@ -13,7 +13,7 @@ from .patch import install, reset
|
||||
from .persist import load_cassette, save_cassette
|
||||
from .filters import filter_request
|
||||
from .serializers import yamlserializer
|
||||
from .matchers import requests_match, url, method
|
||||
from .matchers import requests_match, uri, method
|
||||
from .errors import UnhandledHTTPRequestError
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ class Cassette(ContextDecorator):
|
||||
path,
|
||||
serializer=yamlserializer,
|
||||
record_mode='once',
|
||||
match_on=[url, method],
|
||||
match_on=[uri, method]):
|
||||
filter_headers=[],
|
||||
filter_query_parameters=[],
|
||||
before_record=None,
|
||||
|
||||
@@ -30,7 +30,8 @@ class VCR(object):
|
||||
}
|
||||
self.matchers = {
|
||||
'method': matchers.method,
|
||||
'url': matchers.url,
|
||||
'uri': matchers.uri,
|
||||
'url': matchers.uri, # matcher for backwards compatibility
|
||||
'scheme': matchers.scheme,
|
||||
'host': matchers.host,
|
||||
'port': matchers.method,
|
||||
|
||||
@@ -5,8 +5,8 @@ def method(r1, r2):
|
||||
return r1.method == r2.method
|
||||
|
||||
|
||||
def url(r1, r2):
|
||||
return r1.url == r2.url
|
||||
def uri(r1, r2):
|
||||
return r1.uri == r2.uri
|
||||
|
||||
|
||||
def host(r1, r2):
|
||||
|
||||
Reference in New Issue
Block a user