1
0
mirror of https://github.com/kevin1024/vcrpy.git synced 2025-12-09 01:03:24 +00:00

lets make url the actual url instead of just the path

This commit is contained in:
Kevin McCarthy
2013-08-10 13:09:35 -10:00
parent a50cebaf21
commit 59567a26cc
4 changed files with 32 additions and 28 deletions

View File

@@ -1,15 +1,19 @@
class Request(object):
def __init__(self, host, port, method, url, body, headers):
def __init__(self, host, port, method, path, body, headers):
self.host = host
self.port = port
self.method = method
self.url = url
self.path = path
self.body = body
self.headers = frozenset(headers.items())
@property
def url(self):
return self.host + self.path
def __key(self):
return (self.host, self.port, self.method, self.url, self.body, self.headers)
return (self.host, self.port, self.method, self.path, self.body, self.headers)
def __hash__(self):
return hash(self.__key())