MCPcopy
hub / github.com/psf/requests / test_non_prepared_request_error

Method test_non_prepared_request_error

tests/test_requests.py:1144–1150  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1142 assert resp.status_code == 200
1143
1144 def test_non_prepared_request_error(self):
1145 s = requests.Session()
1146 req = requests.Request("POST", "/")
1147
1148 with pytest.raises(ValueError) as e:
1149 s.send(req)
1150 assert str(e.value) == "You can only send PreparedRequests."
1151
1152 def test_custom_content_type(self, httpbin):
1153 with open(__file__, "rb") as f1:

Callers

nothing calls this directly

Calls 1

sendMethod · 0.95

Tested by

no test coverage detected