mirror of
https://github.com/kennethreitz/requests.git
synced 2026-06-05 22:50:18 +00:00
Merge pull request #2994 from Stranger6667/fix-bad-test
Fixed test execution.
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
import os
|
||||
import platform
|
||||
import re
|
||||
import sys
|
||||
|
||||
|
||||
+4
-2
@@ -606,11 +606,13 @@ class TestRequests:
|
||||
|
||||
def test_hook_receives_request_arguments(self, httpbin):
|
||||
def hook(resp, **kwargs):
|
||||
# FIXME. Not executed
|
||||
assert resp is not None
|
||||
assert kwargs != {}
|
||||
|
||||
requests.Request('GET', httpbin(), hooks={'response': hook})
|
||||
s = requests.Session()
|
||||
r = requests.Request('GET', httpbin(), hooks={'response': hook})
|
||||
prep = s.prepare_request(r)
|
||||
s.send(prep)
|
||||
|
||||
def test_session_hooks_are_used_with_no_request_hooks(self, httpbin):
|
||||
hook = lambda x, *args, **kwargs: x
|
||||
|
||||
Reference in New Issue
Block a user