Test API response Exception
()
| 41 | |
| 42 | |
| 43 | def 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() |
nothing calls this directly
no test coverage detected
searching dependent graphs…