MCPcopy Create free account
hub / github.com/DPhi-Space/SimSat / _test_mapbox_endpoint

Function _test_mapbox_endpoint

scripts/api_test.py:85–100  ·  view source on GitHub ↗
(endpoint: str, params: Dict[str, Any])

Source from the content-addressed store, hash-verified

83
84
85def _test_mapbox_endpoint(endpoint: str, params: Dict[str, Any]) -> None:
86 response = _request_get(endpoint, params=params)
87 if response is None:
88 return
89
90 try:
91 metadata = json.loads(response.headers.get("mapbox_metadata", ""))
92 except json.JSONDecodeError:
93 metadata = None
94
95 print(f"Mapbox metadata: {metadata}")
96 if not metadata.get("image_available"):
97 print("No image available")
98 return
99
100 _show_png(response.content, "Mapbox image")
101
102
103def test_sentinel_current() -> None:

Callers 2

test_mapbox_currentFunction · 0.85
test_mapboxFunction · 0.85

Calls 2

_request_getFunction · 0.85
_show_pngFunction · 0.85

Tested by

no test coverage detected