MCPcopy Index your code
hub / github.com/pyscript/pyscript / test_fetch_response_not_ok

Function test_fetch_response_not_ok

core/tests/python/tests/test_fetch.py:132–139  ·  view source on GitHub ↗

The fetch function should return a response with ok set to False for failed requests.

()

Source from the content-addressed store, hash-verified

130
131
132async def test_fetch_response_not_ok():
133 """
134 The fetch function should return a response with ok set to False for
135 failed requests.
136 """
137 response = await fetch("https://jsonplaceholder.typicode.com/todos/1000")
138 assert not response.ok
139 assert response.status == 404
140
141
142async def test_fetch_response_status():

Callers

nothing calls this directly

Calls 1

fetchFunction · 0.90

Tested by

no test coverage detected