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

Function test_fetch_blob

core/tests/python/tests/test_fetch.py:103–111  ·  view source on GitHub ↗

The fetch function should return a blob response.

()

Source from the content-addressed store, hash-verified

101
102
103async def test_fetch_blob():
104 """
105 The fetch function should return a blob response.
106 """
107 response = await fetch("https://jsonplaceholder.typicode.com/todos/1")
108 assert response.ok
109 blob = await response.blob()
110 assert blob.size > 0
111 assert blob.type in ["application/json", "application/json; charset=utf-8"]
112
113
114async def test_fetch_blob_direct():

Callers

nothing calls this directly

Calls 2

fetchFunction · 0.90
blobMethod · 0.45

Tested by

no test coverage detected