The fetch function should return a response with ok set to True for successful requests.
()
| 121 | |
| 122 | |
| 123 | async def test_fetch_response_ok(): |
| 124 | """ |
| 125 | The fetch function should return a response with ok set to True for |
| 126 | successful requests. |
| 127 | """ |
| 128 | response = await fetch("https://jsonplaceholder.typicode.com/todos/1") |
| 129 | assert response.ok |
| 130 | |
| 131 | |
| 132 | async def test_fetch_response_not_ok(): |