From 70237df894c52071794b2d0aaf2099c9694b962b Mon Sep 17 00:00:00 2001 From: Alex Barnsley <8069294+alexbarnsley@users.noreply.github.com> Date: Mon, 20 Apr 2026 14:01:05 +0100 Subject: [PATCH] chore: rename arkclient to client --- client/__init__.py | 2 +- client/client.py | 2 +- tests/api/test_api_nodes.py | 6 +++--- tests/api/test_blockchain.py | 4 ++-- tests/api/test_blocks.py | 14 ++++++------- tests/api/test_commits.py | 4 ++-- tests/api/test_contracts.py | 6 +++--- tests/api/test_evm.py | 4 ++-- tests/api/test_node.py | 14 ++++++------- tests/api/test_peers.py | 8 ++++---- tests/api/test_receipts.py | 14 ++++++------- tests/api/test_rounds.py | 10 +++++----- tests/api/test_tokens.py | 30 ++++++++++++++-------------- tests/api/test_transactions.py | 18 ++++++++--------- tests/api/test_validators.py | 12 ++++++------ tests/api/test_votes.py | 8 ++++---- tests/api/test_wallets.py | 36 +++++++++++++++++----------------- tests/test_client.py | 4 ++-- 18 files changed, 98 insertions(+), 98 deletions(-) diff --git a/client/__init__.py b/client/__init__.py index 680dc4a..5f22e94 100644 --- a/client/__init__.py +++ b/client/__init__.py @@ -1 +1 @@ -from .client import ArkClient # noqa +from .client import Client # noqa diff --git a/client/client.py b/client/client.py index 82bd3b8..86c8353 100644 --- a/client/client.py +++ b/client/client.py @@ -16,7 +16,7 @@ from client.api.votes import Votes from client.api.wallets import Wallets -class ArkClient(object): +class Client(object): def __init__(self, hosts: Union[str, ClientHosts]): """ diff --git a/tests/api/test_api_nodes.py b/tests/api/test_api_nodes.py index 4bae79f..c3be92f 100644 --- a/tests/api/test_api_nodes.py +++ b/tests/api/test_api_nodes.py @@ -1,5 +1,5 @@ import responses -from client import ArkClient +from client import Client def test_api_nodes_calls_correct_url(): @@ -10,7 +10,7 @@ def test_api_nodes_calls_correct_url(): status=200 ) - client = ArkClient('http://127.0.0.1:4002/api') + client = Client('http://127.0.0.1:4002/api') client.api_nodes.all() assert len(responses.calls) == 1 assert responses.calls[0].request.url == ( @@ -26,7 +26,7 @@ def test_api_nodes_calls_correct_url_with_params(): status=200 ) - client = ArkClient('http://127.0.0.1:4002/api') + client = Client('http://127.0.0.1:4002/api') client.api_nodes.all({ 'query_param1': 'value1', 'query_param2': 'value2', diff --git a/tests/api/test_blockchain.py b/tests/api/test_blockchain.py index b5b0283..345175c 100644 --- a/tests/api/test_blockchain.py +++ b/tests/api/test_blockchain.py @@ -1,5 +1,5 @@ import responses -from client import ArkClient +from client import Client def test_blockchain_calls_correct_url(): @@ -10,7 +10,7 @@ def test_blockchain_calls_correct_url(): status=200 ) - client = ArkClient('http://127.0.0.1:4002/api') + client = Client('http://127.0.0.1:4002/api') client.blockchain.blockchain() assert len(responses.calls) == 1 assert responses.calls[0].request.url == 'http://127.0.0.1:4002/api/blockchain' diff --git a/tests/api/test_blocks.py b/tests/api/test_blocks.py index da7f8df..0081dd8 100644 --- a/tests/api/test_blocks.py +++ b/tests/api/test_blocks.py @@ -1,6 +1,6 @@ import responses -from client import ArkClient +from client import Client def test_all_calls_correct_url(): @@ -11,7 +11,7 @@ def test_all_calls_correct_url(): status=200 ) - client = ArkClient('http://127.0.0.1:4002/api') + client = Client('http://127.0.0.1:4002/api') client.blocks.all() assert len(responses.calls) == 1 assert responses.calls[0].request.url == ( @@ -27,7 +27,7 @@ def test_all_calls_correct_url_with_params(): status=200 ) - client = ArkClient('http://127.0.0.1:4002/api') + client = Client('http://127.0.0.1:4002/api') client.blocks.all({ 'page': 5, 'limit': 69, @@ -52,7 +52,7 @@ def test_get_calls_correct_url(): status=200 ) - client = ArkClient('http://127.0.0.1:4002/api') + client = Client('http://127.0.0.1:4002/api') client.blocks.get(block_id) assert len(responses.calls) == 1 @@ -69,7 +69,7 @@ def test_first_calls_correct_url(): status=200 ) - client = ArkClient('http://127.0.0.1:4002/api') + client = Client('http://127.0.0.1:4002/api') client.blocks.first() assert len(responses.calls) == 1 @@ -86,7 +86,7 @@ def test_last_calls_correct_url(): status=200 ) - client = ArkClient('http://127.0.0.1:4002/api') + client = Client('http://127.0.0.1:4002/api') client.blocks.last() assert len(responses.calls) == 1 @@ -106,7 +106,7 @@ def test_transactions_calls_correct_url_with_params(): status=200 ) - client = ArkClient('http://127.0.0.1:4002/api') + client = Client('http://127.0.0.1:4002/api') client.blocks.transactions(block_id, { 'page': 5, 'limit': 69, diff --git a/tests/api/test_commits.py b/tests/api/test_commits.py index 28c88e3..fe6a884 100644 --- a/tests/api/test_commits.py +++ b/tests/api/test_commits.py @@ -1,5 +1,5 @@ import responses -from client import ArkClient +from client import Client @responses.activate @@ -11,7 +11,7 @@ def test_show_calls_correct_url(): status=200 ) - client = ArkClient('http://127.0.0.1:4002/api') + client = Client('http://127.0.0.1:4002/api') client.commits.get(1) assert len(responses.calls) == 1 assert responses.calls[0].request.url == 'http://127.0.0.1:4002/api/commits/1' diff --git a/tests/api/test_contracts.py b/tests/api/test_contracts.py index c1fde3e..5aefbae 100644 --- a/tests/api/test_contracts.py +++ b/tests/api/test_contracts.py @@ -1,5 +1,5 @@ import responses -from client import ArkClient +from client import Client def test_all_calls_correct_url(): @@ -10,7 +10,7 @@ def test_all_calls_correct_url(): status=200 ) - client = ArkClient('http://127.0.0.1:4002/api') + client = Client('http://127.0.0.1:4002/api') client.contracts.all() assert len(responses.calls) == 1 assert responses.calls[0].request.url == 'http://127.0.0.1:4002/api/contracts' @@ -24,7 +24,7 @@ def test_abi_calls_correct_url(): status=200 ) - client = ArkClient('http://127.0.0.1:4002/api') + client = Client('http://127.0.0.1:4002/api') client.contracts.abi('consensus', 'some-address') assert len(responses.calls) == 1 assert responses.calls[0].request.url == 'http://127.0.0.1:4002/api/contracts/consensus/some-address/abi' diff --git a/tests/api/test_evm.py b/tests/api/test_evm.py index 1765842..a3d1876 100644 --- a/tests/api/test_evm.py +++ b/tests/api/test_evm.py @@ -1,7 +1,7 @@ import json import responses -from client import ArkClient +from client import Client def test_eth_call_methods_correct_url(): @@ -12,7 +12,7 @@ def test_eth_call_methods_correct_url(): status=200 ) - client = ArkClient('http://127.0.0.1:4002/evm/api') + client = Client('http://127.0.0.1:4002/evm/api') client.evm.call({ 'method': 'eth_call', 'params': [[{ 'random': 'data' }], 'latest'], diff --git a/tests/api/test_node.py b/tests/api/test_node.py index e86f0ec..7e9b951 100644 --- a/tests/api/test_node.py +++ b/tests/api/test_node.py @@ -1,6 +1,6 @@ import responses -from client import ArkClient +from client import Client def test_status_calls_correct_url(): @@ -11,7 +11,7 @@ def test_status_calls_correct_url(): status=200 ) - client = ArkClient('http://127.0.0.1:4002/api') + client = Client('http://127.0.0.1:4002/api') client.node.status() assert len(responses.calls) == 1 assert responses.calls[0].request.url == ( @@ -27,7 +27,7 @@ def test_syncing_calls_correct_url(): status=200 ) - client = ArkClient('http://127.0.0.1:4002/api') + client = Client('http://127.0.0.1:4002/api') client.node.syncing() assert len(responses.calls) == 1 assert responses.calls[0].request.url == ( @@ -43,7 +43,7 @@ def test_configuration_calls_correct_url(): status=200 ) - client = ArkClient('http://127.0.0.1:4002/api') + client = Client('http://127.0.0.1:4002/api') client.node.configuration() assert len(responses.calls) == 1 assert responses.calls[0].request.url == ( @@ -59,7 +59,7 @@ def test_configuration_crypto_call_correct_url(): status=200 ) - client = ArkClient('http://127.0.0.1:4002/api') + client = Client('http://127.0.0.1:4002/api') client.node.crypto() assert len(responses.calls) == 1 assert responses.calls[0].request.url == ( @@ -75,7 +75,7 @@ def test_fees_calls_correct_url(): status=200 ) - client = ArkClient('http://127.0.0.1:4002/api') + client = Client('http://127.0.0.1:4002/api') client.node.fees() assert len(responses.calls) == 1 assert responses.calls[0].request.url == ( @@ -91,7 +91,7 @@ def test_fees_calls_correct_url_with_params(): status=200 ) - client = ArkClient('http://127.0.0.1:4002/api') + client = Client('http://127.0.0.1:4002/api') client.node.fees({'days': 14}) assert len(responses.calls) == 1 url = responses.calls[0].request.url diff --git a/tests/api/test_peers.py b/tests/api/test_peers.py index f6a631a..cddc33a 100644 --- a/tests/api/test_peers.py +++ b/tests/api/test_peers.py @@ -1,6 +1,6 @@ import responses -from client import ArkClient +from client import Client def test_all_calls_correct_url(): @@ -11,7 +11,7 @@ def test_all_calls_correct_url(): status=200 ) - client = ArkClient('http://127.0.0.1:4002/api') + client = Client('http://127.0.0.1:4002/api') client.peers.all() assert len(responses.calls) == 1 assert responses.calls[0].request.url == ( @@ -27,7 +27,7 @@ def test_all_calls_correct_url_with_params(): status=200 ) - client = ArkClient('http://127.0.0.1:4002/api') + client = Client('http://127.0.0.1:4002/api') client.peers.all({ 'os': 'a', 'status': 'live', @@ -58,7 +58,7 @@ def test_get_calls_correct_url_with_ip(): status=200 ) - client = ArkClient('http://127.0.0.1:4002/api') + client = Client('http://127.0.0.1:4002/api') client.peers.get(ip) assert len(responses.calls) == 1 assert responses.calls[0].request.url == ( diff --git a/tests/api/test_receipts.py b/tests/api/test_receipts.py index bc16f25..b739b09 100644 --- a/tests/api/test_receipts.py +++ b/tests/api/test_receipts.py @@ -1,5 +1,5 @@ import responses -from client import ArkClient +from client import Client def test_all_calls_correct_url(): @@ -10,7 +10,7 @@ def test_all_calls_correct_url(): status=200 ) - client = ArkClient('http://127.0.0.1:4002/api') + client = Client('http://127.0.0.1:4002/api') client.receipts.all() assert len(responses.calls) == 1 assert responses.calls[0].request.url == ( @@ -26,7 +26,7 @@ def test_all_calls_correct_url_with_params(): status=200 ) - client = ArkClient('http://127.0.0.1:4002/api') + client = Client('http://127.0.0.1:4002/api') client.receipts.all({ 'query_param1': 'value1', 'query_param2': 'value2', @@ -47,7 +47,7 @@ def test_get_calls_correct_url(): status=200 ) - client = ArkClient('http://127.0.0.1:4002/api') + client = Client('http://127.0.0.1:4002/api') client.receipts.get(transaction_hash) assert len(responses.calls) == 1 assert responses.calls[0].request.url == ( @@ -64,7 +64,7 @@ def test_get_calls_correct_url_with_params(): status=200 ) - client = ArkClient('http://127.0.0.1:4002/api') + client = Client('http://127.0.0.1:4002/api') client.receipts.get(transaction_hash, {'format': 'hex'}) assert len(responses.calls) == 1 url = responses.calls[0].request.url @@ -80,7 +80,7 @@ def test_contracts_calls_correct_url(): status=200 ) - client = ArkClient('http://127.0.0.1:4002/api') + client = Client('http://127.0.0.1:4002/api') client.receipts.contracts() assert len(responses.calls) == 1 assert responses.calls[0].request.url == ( @@ -96,7 +96,7 @@ def test_contracts_calls_correct_url_with_params(): status=200 ) - client = ArkClient('http://127.0.0.1:4002/api') + client = Client('http://127.0.0.1:4002/api') client.receipts.contracts({'status': 'success'}) assert len(responses.calls) == 1 url = responses.calls[0].request.url diff --git a/tests/api/test_rounds.py b/tests/api/test_rounds.py index 1edbd99..b8b860b 100644 --- a/tests/api/test_rounds.py +++ b/tests/api/test_rounds.py @@ -1,5 +1,5 @@ import responses -from client import ArkClient +from client import Client def test_all_calls_correct_url(): @@ -10,7 +10,7 @@ def test_all_calls_correct_url(): status=200 ) - client = ArkClient('http://127.0.0.1:4002/api') + client = Client('http://127.0.0.1:4002/api') client.rounds.all() assert len(responses.calls) == 1 assert responses.calls[0].request.url == ( @@ -26,7 +26,7 @@ def test_all_calls_correct_url_with_params(): status=200 ) - client = ArkClient('http://127.0.0.1:4002/api') + client = Client('http://127.0.0.1:4002/api') client.rounds.all({ 'query_param1': 'value1', 'query_param2': 'value2', @@ -47,7 +47,7 @@ def test_show_calls_correct_url(): status=200 ) - client = ArkClient('http://127.0.0.1:4002/api') + client = Client('http://127.0.0.1:4002/api') client.rounds.show(round_id) assert len(responses.calls) == 1 assert responses.calls[0].request.url == ( @@ -64,7 +64,7 @@ def test_validators_calls_correct_url(): status=200 ) - client = ArkClient('http://127.0.0.1:4002/api') + client = Client('http://127.0.0.1:4002/api') client.rounds.validators(round_id) assert len(responses.calls) == 1 diff --git a/tests/api/test_tokens.py b/tests/api/test_tokens.py index 7505f96..b8af5a4 100644 --- a/tests/api/test_tokens.py +++ b/tests/api/test_tokens.py @@ -1,6 +1,6 @@ import responses -from client import ArkClient +from client import Client def test_all_calls_correct_url(): @@ -11,7 +11,7 @@ def test_all_calls_correct_url(): status=200 ) - client = ArkClient('http://127.0.0.1:4002/api') + client = Client('http://127.0.0.1:4002/api') client.tokens.all() assert len(responses.calls) == 1 assert responses.calls[0].request.url == ( @@ -27,7 +27,7 @@ def test_all_calls_correct_url_with_params(): status=200 ) - client = ArkClient('http://127.0.0.1:4002/api') + client = Client('http://127.0.0.1:4002/api') client.tokens.all({'page': 5, 'limit': 69}) assert len(responses.calls) == 1 url = responses.calls[0].request.url @@ -45,7 +45,7 @@ def test_get_calls_correct_url(): status=200 ) - client = ArkClient('http://127.0.0.1:4002/api') + client = Client('http://127.0.0.1:4002/api') client.tokens.get(address) assert len(responses.calls) == 1 assert responses.calls[0].request.url == ( @@ -62,7 +62,7 @@ def test_holders_for_calls_correct_url(): status=200 ) - client = ArkClient('http://127.0.0.1:4002/api') + client = Client('http://127.0.0.1:4002/api') client.tokens.holders_for(address) assert len(responses.calls) == 1 assert responses.calls[0].request.url == ( @@ -79,7 +79,7 @@ def test_transfers_for_calls_correct_url(): status=200 ) - client = ArkClient('http://127.0.0.1:4002/api') + client = Client('http://127.0.0.1:4002/api') client.tokens.transfers_for(address) assert len(responses.calls) == 1 assert responses.calls[0].request.url == ( @@ -96,7 +96,7 @@ def test_transfers_for_calls_correct_url_with_params(): status=200 ) - client = ArkClient('http://127.0.0.1:4002/api') + client = Client('http://127.0.0.1:4002/api') client.tokens.transfers_for(address, {'page': 2, 'limit': 25}) assert len(responses.calls) == 1 url = responses.calls[0].request.url @@ -116,7 +116,7 @@ def test_approvals_for_calls_correct_url(): status=200 ) - client = ArkClient('http://127.0.0.1:4002/api') + client = Client('http://127.0.0.1:4002/api') client.tokens.approvals_for(address) assert len(responses.calls) == 1 assert responses.calls[0].request.url == ( @@ -133,7 +133,7 @@ def test_approvals_for_calls_correct_url_with_params(): status=200 ) - client = ArkClient('http://127.0.0.1:4002/api') + client = Client('http://127.0.0.1:4002/api') client.tokens.approvals_for(address, {'page': 2, 'limit': 25}) assert len(responses.calls) == 1 url = responses.calls[0].request.url @@ -152,7 +152,7 @@ def test_transfers_calls_correct_url(): status=200 ) - client = ArkClient('http://127.0.0.1:4002/api') + client = Client('http://127.0.0.1:4002/api') client.tokens.transfers() assert len(responses.calls) == 1 assert responses.calls[0].request.url == ( @@ -168,7 +168,7 @@ def test_transfers_calls_correct_url_with_params(): status=200 ) - client = ArkClient('http://127.0.0.1:4002/api') + client = Client('http://127.0.0.1:4002/api') client.tokens.transfers({'page': 1, 'limit': 10}) assert len(responses.calls) == 1 url = responses.calls[0].request.url @@ -187,7 +187,7 @@ def test_approvals_calls_correct_url(): status=200 ) - client = ArkClient('http://127.0.0.1:4002/api') + client = Client('http://127.0.0.1:4002/api') client.tokens.approvals() assert len(responses.calls) == 1 assert responses.calls[0].request.url == ( @@ -203,7 +203,7 @@ def test_approvals_calls_correct_url_with_params(): status=200 ) - client = ArkClient('http://127.0.0.1:4002/api') + client = Client('http://127.0.0.1:4002/api') client.tokens.approvals({'page': 1, 'limit': 10}) assert len(responses.calls) == 1 url = responses.calls[0].request.url @@ -222,7 +222,7 @@ def test_whitelist_calls_correct_url(): status=200 ) - client = ArkClient('http://127.0.0.1:4002/api') + client = Client('http://127.0.0.1:4002/api') client.tokens.whitelist() assert len(responses.calls) == 1 assert responses.calls[0].request.url == ( @@ -238,7 +238,7 @@ def test_whitelist_calls_correct_url_with_params(): status=200 ) - client = ArkClient('http://127.0.0.1:4002/api') + client = Client('http://127.0.0.1:4002/api') client.tokens.whitelist({'page': 3, 'limit': 50}) assert len(responses.calls) == 1 url = responses.calls[0].request.url diff --git a/tests/api/test_transactions.py b/tests/api/test_transactions.py index b0d4fe1..ad39204 100644 --- a/tests/api/test_transactions.py +++ b/tests/api/test_transactions.py @@ -2,7 +2,7 @@ import responses -from client import ArkClient +from client import Client def test_all_calls_correct_url(): @@ -13,7 +13,7 @@ def test_all_calls_correct_url(): status=200 ) - client = ArkClient('http://127.0.0.1:4002/api') + client = Client('http://127.0.0.1:4002/api') client.transactions.all() assert len(responses.calls) == 1 assert responses.calls[0].request.url == ( @@ -29,7 +29,7 @@ def test_all_calls_correct_url_with_params(): status=200 ) - client = ArkClient('http://127.0.0.1:4002/api') + client = Client('http://127.0.0.1:4002/api') client.transactions.all({ 'page': 5, 'limit': 69, @@ -53,7 +53,7 @@ def test_create_calls_correct_url_with_data(): status=200 ) - client = ArkClient('http://127.0.0.1:4002/tx/api') + client = Client('http://127.0.0.1:4002/tx/api') client.transactions.create([{'random': 'data'}]) assert len(responses.calls) == 1 assert responses.calls[0].request.url == ( @@ -75,7 +75,7 @@ def test_get_calls_correct_url(): status=200 ) - client = ArkClient('http://127.0.0.1:4002/api') + client = Client('http://127.0.0.1:4002/api') client.transactions.get(transaction_id) assert len(responses.calls) == 1 @@ -92,7 +92,7 @@ def test_all_unconfirmed_calls_correct_url(): status=200 ) - client = ArkClient({ + client = Client({ 'api': 'http://127.0.0.1:4002/api', 'transactions': 'http://127.0.0.1:4002/tx/api', 'evm': None, @@ -112,7 +112,7 @@ def test_all_unconfirmed_calls_correct_url_with_params(): status=200 ) - client = ArkClient({ + client = Client({ 'api': 'http://127.0.0.1:4002/api', 'transactions': 'http://127.0.0.1:4002/tx/api', 'evm': None, @@ -144,7 +144,7 @@ def test_get_unconfirmed_calls_correct_url(): status=200 ) - client = ArkClient({ + client = Client({ 'api': 'http://127.0.0.1:4002/api', 'transactions': 'http://127.0.0.1:4002/tx/api', 'evm': None, @@ -164,7 +164,7 @@ def test_configuration_calls_correct_url(): status=200 ) - client = ArkClient({ + client = Client({ 'api': 'http://127.0.0.1:4002/api', 'transactions': 'http://127.0.0.1:4002/tx/api', 'evm': None, diff --git a/tests/api/test_validators.py b/tests/api/test_validators.py index df745dd..d87ffcd 100644 --- a/tests/api/test_validators.py +++ b/tests/api/test_validators.py @@ -1,6 +1,6 @@ import responses -from client import ArkClient +from client import Client def test_all_calls_correct_url(): @@ -11,7 +11,7 @@ def test_all_calls_correct_url(): status=200 ) - client = ArkClient('http://127.0.0.1:4002/api') + client = Client('http://127.0.0.1:4002/api') client.validators.all() assert len(responses.calls) == 1 assert responses.calls[0].request.url == ( @@ -27,7 +27,7 @@ def test_all_calls_correct_url_with_params(): status=200 ) - client = ArkClient('http://127.0.0.1:4002/api') + client = Client('http://127.0.0.1:4002/api') client.validators.all({ 'page': 5, 'limit': 69, @@ -52,7 +52,7 @@ def test_get_calls_correct_url(): status=200 ) - client = ArkClient('http://127.0.0.1:4002/api') + client = Client('http://127.0.0.1:4002/api') client.validators.get(validator_id) assert len(responses.calls) == 1 @@ -72,7 +72,7 @@ def test_blocks_calls_correct_url(): status=200 ) - client = ArkClient('http://127.0.0.1:4002/api') + client = Client('http://127.0.0.1:4002/api') client.validators.blocks(validator_id, { 'limit': 100, 'orderBy': 'timestamp:desc', @@ -98,7 +98,7 @@ def test_voters_calls_correct_url(): status=200 ) - client = ArkClient('http://127.0.0.1:4002/api') + client = Client('http://127.0.0.1:4002/api') client.validators.voters(validator_id, { 'limit': 100, 'orderBy': 'timestamp:desc', diff --git a/tests/api/test_votes.py b/tests/api/test_votes.py index a924ae3..330e9a4 100644 --- a/tests/api/test_votes.py +++ b/tests/api/test_votes.py @@ -1,6 +1,6 @@ import responses -from client import ArkClient +from client import Client def test_all_calls_correct_url(): @@ -11,7 +11,7 @@ def test_all_calls_correct_url(): status=200 ) - client = ArkClient('http://127.0.0.1:4002/api') + client = Client('http://127.0.0.1:4002/api') client.votes.all() assert len(responses.calls) == 1 assert responses.calls[0].request.url == ( @@ -27,7 +27,7 @@ def test_all_calls_correct_url_with_params(): status=200 ) - client = ArkClient('http://127.0.0.1:4002/api') + client = Client('http://127.0.0.1:4002/api') client.votes.all({'page': 5, 'limit': 69}) assert len(responses.calls) == 1 url = responses.calls[0].request.url @@ -45,7 +45,7 @@ def test_get_calls_correct_url(): status=200 ) - client = ArkClient('http://127.0.0.1:4002/api') + client = Client('http://127.0.0.1:4002/api') client.votes.get(vote_id) assert len(responses.calls) == 1 diff --git a/tests/api/test_wallets.py b/tests/api/test_wallets.py index e6f602a..9360c00 100644 --- a/tests/api/test_wallets.py +++ b/tests/api/test_wallets.py @@ -1,6 +1,6 @@ import responses -from client import ArkClient +from client import Client def test_all_calls_correct_url(): @@ -11,7 +11,7 @@ def test_all_calls_correct_url(): status=200 ) - client = ArkClient('http://127.0.0.1:4002/api') + client = Client('http://127.0.0.1:4002/api') client.wallets.all() assert len(responses.calls) == 1 assert responses.calls[0].request.url == ( @@ -27,7 +27,7 @@ def test_all_calls_correct_url_with_params(): status=200 ) - client = ArkClient('http://127.0.0.1:4002/api') + client = Client('http://127.0.0.1:4002/api') client.wallets.all({'page': 5, 'limit': 69}) assert len(responses.calls) == 1 url = responses.calls[0].request.url @@ -44,7 +44,7 @@ def test_top_calls_correct_url(): status=200 ) - client = ArkClient('http://127.0.0.1:4002/api') + client = Client('http://127.0.0.1:4002/api') client.wallets.top() assert len(responses.calls) == 1 assert responses.calls[0].request.url == ( @@ -60,7 +60,7 @@ def test_top_calls_correct_url_with_params(): status=200 ) - client = ArkClient('http://127.0.0.1:4002/api') + client = Client('http://127.0.0.1:4002/api') client.wallets.top({'page': 5, 'limit': 69}) assert len(responses.calls) == 1 url = responses.calls[0].request.url @@ -78,7 +78,7 @@ def test_get_calls_correct_url(): status=200 ) - client = ArkClient('http://127.0.0.1:4002/api') + client = Client('http://127.0.0.1:4002/api') client.wallets.get(wallet_id) assert len(responses.calls) == 1 @@ -98,7 +98,7 @@ def test_transactions_calls_correct_url(): status=200 ) - client = ArkClient('http://127.0.0.1:4002/api') + client = Client('http://127.0.0.1:4002/api') client.wallets.transactions(wallet_id) assert len(responses.calls) == 1 assert responses.calls[0].request.url == ( @@ -117,7 +117,7 @@ def test_transactions_calls_correct_url_with_params(): status=200 ) - client = ArkClient('http://127.0.0.1:4002/api') + client = Client('http://127.0.0.1:4002/api') client.wallets.transactions(wallet_id, { 'page': 5, 'limit': 69, @@ -144,7 +144,7 @@ def test_sent_transactions_calls_correct_url(): status=200 ) - client = ArkClient('http://127.0.0.1:4002/api') + client = Client('http://127.0.0.1:4002/api') client.wallets.sent_transactions(wallet_id) assert len(responses.calls) == 1 assert responses.calls[0].request.url == ( @@ -163,7 +163,7 @@ def test_sent_transactions_calls_correct_url_with_params(): status=200 ) - client = ArkClient('http://127.0.0.1:4002/api') + client = Client('http://127.0.0.1:4002/api') client.wallets.sent_transactions(wallet_id, { 'page': 5, 'limit': 69, @@ -187,7 +187,7 @@ def test_received_transactions_calls_correct_url(): status=200 ) - client = ArkClient('http://127.0.0.1:4002/api') + client = Client('http://127.0.0.1:4002/api') client.wallets.received_transactions(wallet_id) assert len(responses.calls) == 1 assert responses.calls[0].request.url == ( @@ -205,7 +205,7 @@ def test_received_transactions_calls_correct_url_with_params(): status=200 ) - client = ArkClient('http://127.0.0.1:4002/api') + client = Client('http://127.0.0.1:4002/api') client.wallets.received_transactions(wallet_id, { 'page': 5, 'limit': 69, @@ -229,7 +229,7 @@ def test_votes_calls_correct_url(): status=200 ) - client = ArkClient('http://127.0.0.1:4002/api') + client = Client('http://127.0.0.1:4002/api') client.wallets.votes(wallet_id) assert len(responses.calls) == 1 assert responses.calls[0].request.url == ( @@ -246,7 +246,7 @@ def test_votes_calls_correct_url_with_params(): status=200 ) - client = ArkClient('http://127.0.0.1:4002/api') + client = Client('http://127.0.0.1:4002/api') client.wallets.votes(wallet_id, {'page': 5, 'limit': 69}) assert len(responses.calls) == 1 url = responses.calls[0].request.url @@ -266,7 +266,7 @@ def test_tokens_for_calls_correct_url(): status=200 ) - client = ArkClient('http://127.0.0.1:4002/api') + client = Client('http://127.0.0.1:4002/api') client.wallets.tokens_for(wallet_id) assert len(responses.calls) == 1 assert responses.calls[0].request.url == ( @@ -283,7 +283,7 @@ def test_tokens_for_calls_correct_url_with_params(): status=200 ) - client = ArkClient('http://127.0.0.1:4002/api') + client = Client('http://127.0.0.1:4002/api') client.wallets.tokens_for(wallet_id, {'page': 5, 'limit': 69}) assert len(responses.calls) == 1 url = responses.calls[0].request.url @@ -302,7 +302,7 @@ def test_tokens_calls_correct_url(): status=200 ) - client = ArkClient('http://127.0.0.1:4002/api') + client = Client('http://127.0.0.1:4002/api') client.wallets.tokens({'addresses': '0xabc,0xdef'}) assert len(responses.calls) == 1 url = responses.calls[0].request.url @@ -320,7 +320,7 @@ def test_tokens_calls_correct_url_with_params(): status=200 ) - client = ArkClient('http://127.0.0.1:4002/api') + client = Client('http://127.0.0.1:4002/api') client.wallets.tokens({ 'addresses': '0xabc,0xdef', 'page': 2, diff --git a/tests/test_client.py b/tests/test_client.py index 5ea70bc..4543f27 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -1,10 +1,10 @@ import pytest -from client.client import ArkClient +from client.client import Client def test_client(): - client = ArkClient('http://127.0.0.1:4002') + client = Client('http://127.0.0.1:4002') assert hasattr(client, 'connection') == True assert hasattr(client, 'api_nodes') == True