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

Function test_fetch_response_ok

core/tests/python/tests/test_fetch.py:123–129  ·  view source on GitHub ↗

The fetch function should return a response with ok set to True for successful requests.

()

Source from the content-addressed store, hash-verified

121
122
123async 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
132async def test_fetch_response_not_ok():

Callers

nothing calls this directly

Calls 1

fetchFunction · 0.90

Tested by

no test coverage detected