Test Invalid response Exception
()
| 15 | |
| 16 | |
| 17 | def test_invalid_json(): |
| 18 | """Test Invalid response Exception""" |
| 19 | |
| 20 | with pytest.raises(BinanceRequestException): |
| 21 | with requests_mock.mock() as m: |
| 22 | m.get( |
| 23 | "https://www.binance.com/exchange-api/v1/public/asset-service/product/get-products?includeEtf=true", |
| 24 | text="<head></html>", |
| 25 | ) |
| 26 | m.get( |
| 27 | "https://www.binance.com/bapi/asset/v2/public/asset-service/product/get-products?includeEtf=true", |
| 28 | text="<head></html>", |
| 29 | ) |
| 30 | client.get_products() |
| 31 | |
| 32 | |
| 33 | def test_api_exception(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…