mirror of
https://github.com/kevin1024/vcrpy.git
synced 2025-12-10 01:25:34 +00:00
Added 'scheme' to Request with matcher and test
This commit is contained in:
@@ -13,6 +13,10 @@ def host(r1, r2):
|
||||
return r1.host == r2.host
|
||||
|
||||
|
||||
def scheme(r1, r2):
|
||||
return r1.scheme == r2.scheme
|
||||
|
||||
|
||||
def port(r1, r2):
|
||||
return r1.port == r2.port
|
||||
|
||||
|
||||
@@ -15,6 +15,10 @@ class Request(object):
|
||||
tmp[key] = value
|
||||
self.headers = frozenset(tmp.iteritems())
|
||||
|
||||
@property
|
||||
def scheme(self):
|
||||
return urlparse(self.uri).scheme
|
||||
|
||||
@property
|
||||
def host(self):
|
||||
return urlparse(self.uri).hostname
|
||||
|
||||
Reference in New Issue
Block a user