| 202 | |
| 203 | |
| 204 | def 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 | |
| 219 | def test_http_HEAD(session, params) -> None: |