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

Function test_http_OPTIONS

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

Source from the content-addressed store, hash-verified

162
163
164def test_http_OPTIONS(session, params):
165 with mock.patch("aiohttp.client.ClientSession._request") as patched:
166 session.options("http://opt.example.com",
167 params={"x": 2},
168 **params)
169 assert patched.called, "`ClientSession._request` not called"
170 assert list(patched.call_args) == [("OPTIONS", "http://opt.example.com",),
171 dict(
172 params={"x": 2},
173 allow_redirects=True,
174 **params)]
175
176
177def test_http_HEAD(session, params):

Callers

nothing calls this directly

Calls 2

patchMethod · 0.80
optionsMethod · 0.80

Tested by

no test coverage detected