1
0
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:
Max Shytikov
2014-04-11 01:32:10 +02:00
parent 7fe55ad8b8
commit 2fa1aaa1f7
6 changed files with 15 additions and 14 deletions

View File

@@ -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,

View File

@@ -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,

View File

@@ -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):