MCPcopy Create free account
hub / github.com/apify/impit / test_passing_binary_body

Method test_passing_binary_body

impit-python/test/no_client_test.py:268–296  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

266 assert response.json()['form']['Impit-Test'] == '👾🕵🏻‍♂️🧑‍💻'
267
268 def test_passing_binary_body(self) -> None:
269 response = impit.post(
270 get_httpbin_url('/post'),
271 content=[
272 0x49,
273 0x6D,
274 0x70,
275 0x69,
276 0x74,
277 0x2D,
278 0x54,
279 0x65,
280 0x73,
281 0x74,
282 0x3A,
283 0x66,
284 0x6F,
285 0x6F,
286 0xC5,
287 0x99,
288 0xC5,
289 0xBE,
290 0xC5,
291 0xA1,
292 ],
293 headers={'Content-Type': 'application/json'},
294 )
295 assert response.status_code == 200
296 assert response.json()['data'] == 'Impit-Test:foořžš'
297
298 @pytest.mark.parametrize(
299 ('method'),

Callers

nothing calls this directly

Calls 3

get_httpbin_urlFunction · 0.85
postMethod · 0.45
jsonMethod · 0.45

Tested by

no test coverage detected