MCPcopy Create free account
hub / github.com/sammchardy/python-binance / test_api_exception_invalid_json

Function test_api_exception_invalid_json

tests/test_api_request.py:43–54  ·  view source on GitHub ↗

Test API response Exception

()

Source from the content-addressed store, hash-verified

41
42
43def test_api_exception_invalid_json():
44 """Test API response Exception"""
45
46 with pytest.raises(BinanceAPIException):
47 with requests_mock.mock() as m:
48 not_json_str = "<html><body>Error</body></html>"
49 m.get(
50 "https://api.binance.com/api/v3/time",
51 text=not_json_str,
52 status_code=400,
53 )
54 client.get_server_time()

Callers

nothing calls this directly

Calls 1

get_server_timeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…