MCPcopy
hub / github.com/scrapy/scrapy / test_post

Method test_post

tests/test_utils_request.py:336–345  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

334 self._test_request(request_object, expected_curl_command)
335
336 def test_post(self):
337 request_object = Request(
338 "https://www.httpbin.org/post",
339 method="POST",
340 body=json.dumps({"foo": "bar"}),
341 )
342 expected_curl_command = (
343 'curl -X POST https://www.httpbin.org/post --data-raw \'{"foo": "bar"}\''
344 )
345 self._test_request(request_object, expected_curl_command)
346
347 def test_headers(self):
348 request_object = Request(

Callers

nothing calls this directly

Calls 2

_test_requestMethod · 0.95
RequestClass · 0.90

Tested by

no test coverage detected