The fetch function should return the expected text response.
()
| 31 | |
| 32 | |
| 33 | async def test_fetch_text(): |
| 34 | """ |
| 35 | The fetch function should return the expected text response. |
| 36 | """ |
| 37 | response = await fetch("https://jsonplaceholder.typicode.com/todos/1") |
| 38 | assert response.ok |
| 39 | text = await response.text() |
| 40 | assert "delectus aut autem" in text |
| 41 | assert "completed" in text |
| 42 | assert "false" in text |
| 43 | assert "1" in text |
| 44 | |
| 45 | |
| 46 | async def test_fetch_text_direct(): |