MCPcopy
hub / github.com/aio-libs/aiohttp / test_http_OPTIONS

Function test_http_OPTIONS

tests/test_client_session.py:204–216  ·  view source on GitHub ↗
(session, params)

Source from the content-addressed store, hash-verified

202
203
204def test_http_OPTIONS(session, params) -> None:
205 with mock.patch(
206 "aiohttp.client.ClientSession._request", new_callable=mock.MagicMock
207 ) as patched:
208 session.options("http://opt.example.com", params={"x": 2}, **params)
209 assert patched.called, "`ClientSession._request` not called"
210 assert list(patched.call_args) == [
211 (
212 "OPTIONS",
213 "http://opt.example.com",
214 ),
215 dict(params={"x": 2}, allow_redirects=True, **params),
216 ]
217
218
219def test_http_HEAD(session, params) -> None:

Callers

nothing calls this directly

Calls 2

patchMethod · 0.45
optionsMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…