Exemplo n.º 1
0
def test_get_account_info(stubbed_sender, test_http_client):
    """Test get_account_info."""
    resp = test_http_client.get_account_info(stubbed_sender.public_key())
    assert_valid_response(resp)
    resp = test_http_client.get_account_info(stubbed_sender.public_key(), encoding="jsonParsed")
    assert_valid_response(resp)
    resp = test_http_client.get_account_info(stubbed_sender.public_key(), data_slice=DataSliceOpt(1, 1))
    assert_valid_response(resp)
Exemplo n.º 2
0
async def test_get_account_info(async_stubbed_sender, test_http_client_async):
    """Test get_account_info."""
    resp = await test_http_client_async.get_account_info(
        async_stubbed_sender.public_key)
    assert_valid_response(resp)
    resp = await test_http_client_async.get_account_info(
        async_stubbed_sender.public_key, encoding="jsonParsed")
    assert_valid_response(resp)
    resp = await test_http_client_async.get_account_info(
        async_stubbed_sender.public_key, data_slice=DataSliceOpt(1, 1))
    assert_valid_response(resp)
Exemplo n.º 3
0
async def test_get_multiple_accounts(async_stubbed_sender,
                                     test_http_client_async):
    """Test get_multiple_accounts."""
    pubkeys = [async_stubbed_sender.public_key] * 2
    resp = await test_http_client_async.get_multiple_accounts(pubkeys)
    assert_valid_response(resp)
    resp = await test_http_client_async.get_multiple_accounts(
        pubkeys, encoding="jsonParsed")
    assert_valid_response(resp)
    resp = await test_http_client_async.get_multiple_accounts(
        pubkeys, data_slice=DataSliceOpt(1, 1))
    assert_valid_response(resp)