예제 #1
0
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()
예제 #2
0
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()
예제 #3
0
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()