| 249 | |
| 250 | |
| 251 | def test_http_PUT(session, params) -> None: |
| 252 | with mock.patch( |
| 253 | "aiohttp.client.ClientSession._request", new_callable=mock.MagicMock |
| 254 | ) as patched: |
| 255 | session.put( |
| 256 | "http://put.example.com", params={"x": 2}, data="Some_data", **params |
| 257 | ) |
| 258 | assert patched.called, "`ClientSession._request` not called" |
| 259 | assert list(patched.call_args) == [ |
| 260 | ( |
| 261 | "PUT", |
| 262 | "http://put.example.com", |
| 263 | ), |
| 264 | dict(params={"x": 2}, data="Some_data", **params), |
| 265 | ] |
| 266 | |
| 267 | |
| 268 | def test_http_PATCH(session, params) -> None: |