def test_wallet_address_set(): with requests_mock.mock() as m: m.post('https://api.idex.market/returnNextNonce', json={'nonce': 1}, status_code=200) client = Client(api_key, address) client.get_my_next_nonce()
def test_wallet_address_not_set(): client = Client(api_key) with pytest.raises(IdexWalletAddressNotFoundException): with requests_mock.mock() as m: m.post('https://api.idex.market/returnNextNonce', json={}, status_code=200) client.get_my_next_nonce()
def test_wallet_address_set(): """Test valid currency""" client = Client('0x926cfc20de3f3bdba2d6e7d75dbb1d0a3f93b9a2') with requests_mock.mock() as m: m.post('https://api.idex.market/returnNextNonce', json=json_res, status_code=200) client.get_my_next_nonce()