Skip to content

Commit 70237df

Browse files
committed
chore: rename arkclient to client
1 parent 03cff51 commit 70237df

18 files changed

Lines changed: 98 additions & 98 deletions

client/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
from .client import ArkClient # noqa
1+
from .client import Client # noqa

client/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
from client.api.votes import Votes
1717
from client.api.wallets import Wallets
1818

19-
class ArkClient(object):
19+
class Client(object):
2020

2121
def __init__(self, hosts: Union[str, ClientHosts]):
2222
"""

tests/api/test_api_nodes.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import responses
2-
from client import ArkClient
2+
from client import Client
33

44

55
def test_api_nodes_calls_correct_url():
@@ -10,7 +10,7 @@ def test_api_nodes_calls_correct_url():
1010
status=200
1111
)
1212

13-
client = ArkClient('http://127.0.0.1:4002/api')
13+
client = Client('http://127.0.0.1:4002/api')
1414
client.api_nodes.all()
1515
assert len(responses.calls) == 1
1616
assert responses.calls[0].request.url == (
@@ -26,7 +26,7 @@ def test_api_nodes_calls_correct_url_with_params():
2626
status=200
2727
)
2828

29-
client = ArkClient('http://127.0.0.1:4002/api')
29+
client = Client('http://127.0.0.1:4002/api')
3030
client.api_nodes.all({
3131
'query_param1': 'value1',
3232
'query_param2': 'value2',

tests/api/test_blockchain.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import responses
2-
from client import ArkClient
2+
from client import Client
33

44

55
def test_blockchain_calls_correct_url():
@@ -10,7 +10,7 @@ def test_blockchain_calls_correct_url():
1010
status=200
1111
)
1212

13-
client = ArkClient('http://127.0.0.1:4002/api')
13+
client = Client('http://127.0.0.1:4002/api')
1414
client.blockchain.blockchain()
1515
assert len(responses.calls) == 1
1616
assert responses.calls[0].request.url == 'http://127.0.0.1:4002/api/blockchain'

tests/api/test_blocks.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import responses
22

3-
from client import ArkClient
3+
from client import Client
44

55

66
def test_all_calls_correct_url():
@@ -11,7 +11,7 @@ def test_all_calls_correct_url():
1111
status=200
1212
)
1313

14-
client = ArkClient('http://127.0.0.1:4002/api')
14+
client = Client('http://127.0.0.1:4002/api')
1515
client.blocks.all()
1616
assert len(responses.calls) == 1
1717
assert responses.calls[0].request.url == (
@@ -27,7 +27,7 @@ def test_all_calls_correct_url_with_params():
2727
status=200
2828
)
2929

30-
client = ArkClient('http://127.0.0.1:4002/api')
30+
client = Client('http://127.0.0.1:4002/api')
3131
client.blocks.all({
3232
'page': 5,
3333
'limit': 69,
@@ -52,7 +52,7 @@ def test_get_calls_correct_url():
5252
status=200
5353
)
5454

55-
client = ArkClient('http://127.0.0.1:4002/api')
55+
client = Client('http://127.0.0.1:4002/api')
5656
client.blocks.get(block_id)
5757

5858
assert len(responses.calls) == 1
@@ -69,7 +69,7 @@ def test_first_calls_correct_url():
6969
status=200
7070
)
7171

72-
client = ArkClient('http://127.0.0.1:4002/api')
72+
client = Client('http://127.0.0.1:4002/api')
7373
client.blocks.first()
7474

7575
assert len(responses.calls) == 1
@@ -86,7 +86,7 @@ def test_last_calls_correct_url():
8686
status=200
8787
)
8888

89-
client = ArkClient('http://127.0.0.1:4002/api')
89+
client = Client('http://127.0.0.1:4002/api')
9090
client.blocks.last()
9191

9292
assert len(responses.calls) == 1
@@ -106,7 +106,7 @@ def test_transactions_calls_correct_url_with_params():
106106
status=200
107107
)
108108

109-
client = ArkClient('http://127.0.0.1:4002/api')
109+
client = Client('http://127.0.0.1:4002/api')
110110
client.blocks.transactions(block_id, {
111111
'page': 5,
112112
'limit': 69,

tests/api/test_commits.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import responses
2-
from client import ArkClient
2+
from client import Client
33

44

55
@responses.activate
@@ -11,7 +11,7 @@ def test_show_calls_correct_url():
1111
status=200
1212
)
1313

14-
client = ArkClient('http://127.0.0.1:4002/api')
14+
client = Client('http://127.0.0.1:4002/api')
1515
client.commits.get(1)
1616
assert len(responses.calls) == 1
1717
assert responses.calls[0].request.url == 'http://127.0.0.1:4002/api/commits/1'

tests/api/test_contracts.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import responses
2-
from client import ArkClient
2+
from client import Client
33

44

55
def test_all_calls_correct_url():
@@ -10,7 +10,7 @@ def test_all_calls_correct_url():
1010
status=200
1111
)
1212

13-
client = ArkClient('http://127.0.0.1:4002/api')
13+
client = Client('http://127.0.0.1:4002/api')
1414
client.contracts.all()
1515
assert len(responses.calls) == 1
1616
assert responses.calls[0].request.url == 'http://127.0.0.1:4002/api/contracts'
@@ -24,7 +24,7 @@ def test_abi_calls_correct_url():
2424
status=200
2525
)
2626

27-
client = ArkClient('http://127.0.0.1:4002/api')
27+
client = Client('http://127.0.0.1:4002/api')
2828
client.contracts.abi('consensus', 'some-address')
2929
assert len(responses.calls) == 1
3030
assert responses.calls[0].request.url == 'http://127.0.0.1:4002/api/contracts/consensus/some-address/abi'

tests/api/test_evm.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import json
22
import responses
33

4-
from client import ArkClient
4+
from client import Client
55

66

77
def test_eth_call_methods_correct_url():
@@ -12,7 +12,7 @@ def test_eth_call_methods_correct_url():
1212
status=200
1313
)
1414

15-
client = ArkClient('http://127.0.0.1:4002/evm/api')
15+
client = Client('http://127.0.0.1:4002/evm/api')
1616
client.evm.call({
1717
'method': 'eth_call',
1818
'params': [[{ 'random': 'data' }], 'latest'],

tests/api/test_node.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import responses
22

3-
from client import ArkClient
3+
from client import Client
44

55

66
def test_status_calls_correct_url():
@@ -11,7 +11,7 @@ def test_status_calls_correct_url():
1111
status=200
1212
)
1313

14-
client = ArkClient('http://127.0.0.1:4002/api')
14+
client = Client('http://127.0.0.1:4002/api')
1515
client.node.status()
1616
assert len(responses.calls) == 1
1717
assert responses.calls[0].request.url == (
@@ -27,7 +27,7 @@ def test_syncing_calls_correct_url():
2727
status=200
2828
)
2929

30-
client = ArkClient('http://127.0.0.1:4002/api')
30+
client = Client('http://127.0.0.1:4002/api')
3131
client.node.syncing()
3232
assert len(responses.calls) == 1
3333
assert responses.calls[0].request.url == (
@@ -43,7 +43,7 @@ def test_configuration_calls_correct_url():
4343
status=200
4444
)
4545

46-
client = ArkClient('http://127.0.0.1:4002/api')
46+
client = Client('http://127.0.0.1:4002/api')
4747
client.node.configuration()
4848
assert len(responses.calls) == 1
4949
assert responses.calls[0].request.url == (
@@ -59,7 +59,7 @@ def test_configuration_crypto_call_correct_url():
5959
status=200
6060
)
6161

62-
client = ArkClient('http://127.0.0.1:4002/api')
62+
client = Client('http://127.0.0.1:4002/api')
6363
client.node.crypto()
6464
assert len(responses.calls) == 1
6565
assert responses.calls[0].request.url == (
@@ -75,7 +75,7 @@ def test_fees_calls_correct_url():
7575
status=200
7676
)
7777

78-
client = ArkClient('http://127.0.0.1:4002/api')
78+
client = Client('http://127.0.0.1:4002/api')
7979
client.node.fees()
8080
assert len(responses.calls) == 1
8181
assert responses.calls[0].request.url == (
@@ -91,7 +91,7 @@ def test_fees_calls_correct_url_with_params():
9191
status=200
9292
)
9393

94-
client = ArkClient('http://127.0.0.1:4002/api')
94+
client = Client('http://127.0.0.1:4002/api')
9595
client.node.fees({'days': 14})
9696
assert len(responses.calls) == 1
9797
url = responses.calls[0].request.url

tests/api/test_peers.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import responses
22

3-
from client import ArkClient
3+
from client import Client
44

55

66
def test_all_calls_correct_url():
@@ -11,7 +11,7 @@ def test_all_calls_correct_url():
1111
status=200
1212
)
1313

14-
client = ArkClient('http://127.0.0.1:4002/api')
14+
client = Client('http://127.0.0.1:4002/api')
1515
client.peers.all()
1616
assert len(responses.calls) == 1
1717
assert responses.calls[0].request.url == (
@@ -27,7 +27,7 @@ def test_all_calls_correct_url_with_params():
2727
status=200
2828
)
2929

30-
client = ArkClient('http://127.0.0.1:4002/api')
30+
client = Client('http://127.0.0.1:4002/api')
3131
client.peers.all({
3232
'os': 'a',
3333
'status': 'live',
@@ -58,7 +58,7 @@ def test_get_calls_correct_url_with_ip():
5858
status=200
5959
)
6060

61-
client = ArkClient('http://127.0.0.1:4002/api')
61+
client = Client('http://127.0.0.1:4002/api')
6262
client.peers.get(ip)
6363
assert len(responses.calls) == 1
6464
assert responses.calls[0].request.url == (

0 commit comments

Comments
 (0)