Test API response Exception
()
| 31 | |
| 32 | |
| 33 | def test_api_exception(): |
| 34 | """Test API response Exception""" |
| 35 | |
| 36 | with pytest.raises(BinanceAPIException): |
| 37 | with requests_mock.mock() as m: |
| 38 | json_obj = {"code": 1002, "msg": "Invalid API call"} |
| 39 | m.get("https://api.binance.com/api/v3/time", json=json_obj, status_code=400) |
| 40 | client.get_server_time() |
| 41 | |
| 42 | |
| 43 | def test_api_exception_invalid_json(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…