mirror of
https://github.com/kevin1024/vcrpy.git
synced 2025-12-10 09:35:34 +00:00
Added query to Request with matcher and test
This commit is contained in:
@@ -21,6 +21,10 @@ def path(r1, r2):
|
||||
return r1.path == r2.path
|
||||
|
||||
|
||||
def query(r1, r2):
|
||||
return r1.query == r2.query
|
||||
|
||||
|
||||
def body(r1, r2):
|
||||
return r1.body == r2.body
|
||||
|
||||
|
||||
@@ -27,6 +27,11 @@ class Request(object):
|
||||
def path(self):
|
||||
return urlparse(self.uri).path
|
||||
|
||||
@property
|
||||
def query(self):
|
||||
q = urlparse(self.uri).query
|
||||
return sorted(parse_qsl(q))
|
||||
|
||||
@property
|
||||
def url(self):
|
||||
return self.uri
|
||||
|
||||
Reference in New Issue
Block a user