The fetch function should support custom headers.
()
| 209 | |
| 210 | |
| 211 | async def test_fetch_with_custom_headers(): |
| 212 | """ |
| 213 | The fetch function should support custom headers. |
| 214 | """ |
| 215 | response = await fetch( |
| 216 | "https://jsonplaceholder.typicode.com/todos/1", |
| 217 | headers={"Accept": "application/json"}, |
| 218 | ) |
| 219 | assert response.ok |
| 220 | data = await response.json() |
| 221 | assert data["id"] == 1 |
| 222 | |
| 223 | |
| 224 | async def test_fetch_multiple_data_extractions(): |