(self, httpbin)
| 1162 | assert b"text/py-content-type" in r.request.body |
| 1163 | |
| 1164 | def test_hook_receives_request_arguments(self, httpbin): |
| 1165 | def hook(resp, **kwargs): |
| 1166 | assert resp is not None |
| 1167 | assert kwargs != {} |
| 1168 | |
| 1169 | s = requests.Session() |
| 1170 | r = requests.Request("GET", httpbin(), hooks={"response": hook}) |
| 1171 | prep = s.prepare_request(r) |
| 1172 | s.send(prep) |
| 1173 | |
| 1174 | def test_session_hooks_are_used_with_no_request_hooks(self, httpbin): |
| 1175 | def hook(*args, **kwargs): |
nothing calls this directly
no test coverage detected