Make the tests pass the method to Request

This commit is contained in:
Ian Cordasco
2015-05-30 09:32:26 -05:00
parent ff8153d9c5
commit 4aa4f82b37
2 changed files with 2 additions and 5 deletions
-3
View File
@@ -226,9 +226,6 @@ class Request(RequestHooksMixin):
params = {} if params is None else params
hooks = {} if hooks is None else hooks
# Default empty string for method.
method = '' if method is None else method
self.hooks = default_hooks()
for (k, v) in list(hooks.items()):
self.register_hook(event=k, hook=v)
+2 -2
View File
@@ -89,7 +89,7 @@ class RequestsTestCase(unittest.TestCase):
requests.get('http://')
def test_basic_building(self):
req = requests.Request()
req = requests.Request(method='GET')
req.url = 'http://kennethreitz.org/'
req.data = {'life': '42'}
@@ -813,7 +813,7 @@ class RequestsTestCase(unittest.TestCase):
assert ('user', 'pass#pass') == requests.utils.get_auth_from_url(url)
def test_cannot_send_unprepared_requests(self):
r = requests.Request(url=HTTPBIN)
r = requests.Request(method='GET', url=HTTPBIN)
with pytest.raises(ValueError):
requests.Session().send(r)