Skip to content

Commit f9e0f51

Browse files
committed
delegate test updates
1 parent 37dfceb commit f9e0f51

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

tests/api/test_rounds.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,17 +47,17 @@ def test_show_calls_correct_url():
4747
assert responses.calls[0].request.url == 'http://127.0.0.1:4002/api/rounds/12345'
4848

4949

50-
def test_delegates_calls_correct_url():
50+
def test_validators_calls_correct_url():
5151
round_id = '12345'
5252
responses.add(
5353
responses.GET,
54-
f'http://127.0.0.1:4002/api/rounds/{round_id}/delegates',
54+
f'http://127.0.0.1:4002/api/rounds/{round_id}/validators',
5555
json={'success': True},
5656
status=200
5757
)
5858

5959
client = ArkClient('http://127.0.0.1:4002/api')
60-
client.rounds.delegates(round_id)
60+
client.rounds.validators(round_id)
6161

6262
assert len(responses.calls) == 1
63-
assert responses.calls[0].request.url == 'http://127.0.0.1:4002/api/rounds/12345/delegates'
63+
assert responses.calls[0].request.url == 'http://127.0.0.1:4002/api/rounds/12345/validators'

tests/api/test_validators.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -53,32 +53,32 @@ def test_all_calls_correct_url_with_additional_params():
5353

5454

5555
def test_get_calls_correct_url():
56-
delegate_id = '12345'
56+
validator_id = '12345'
5757
responses.add(
5858
responses.GET,
59-
'http://127.0.0.1:4002/api/validators/{}'.format(delegate_id),
59+
'http://127.0.0.1:4002/api/validators/{}'.format(validator_id),
6060
json={'success': True},
6161
status=200
6262
)
6363

6464
client = ArkClient('http://127.0.0.1:4002/api')
65-
client.validators.get(delegate_id)
65+
client.validators.get(validator_id)
6666

6767
assert len(responses.calls) == 1
6868
assert responses.calls[0].request.url == 'http://127.0.0.1:4002/api/validators/12345'
6969

7070

7171
def test_blocks_calls_correct_url():
72-
delegate_id = '12345'
72+
validator_id = '12345'
7373
responses.add(
7474
responses.GET,
75-
'http://127.0.0.1:4002/api/validators/{}/blocks'.format(delegate_id),
75+
'http://127.0.0.1:4002/api/validators/{}/blocks'.format(validator_id),
7676
json={'success': True},
7777
status=200
7878
)
7979

8080
client = ArkClient('http://127.0.0.1:4002/api')
81-
client.validators.blocks(delegate_id, limit=100, orderBy='timestamp:desc')
81+
client.validators.blocks(validator_id, limit=100, orderBy='timestamp:desc')
8282

8383
assert len(responses.calls) == 1
8484
assert responses.calls[0].request.url.startswith('http://127.0.0.1:4002/api/validators/12345/blocks?')
@@ -87,16 +87,16 @@ def test_blocks_calls_correct_url():
8787

8888

8989
def test_voters_calls_correct_url():
90-
delegate_id = '12345'
90+
validator_id = '12345'
9191
responses.add(
9292
responses.GET,
93-
'http://127.0.0.1:4002/api/validators/{}/voters'.format(delegate_id),
93+
'http://127.0.0.1:4002/api/validators/{}/voters'.format(validator_id),
9494
json={'success': True},
9595
status=200
9696
)
9797

9898
client = ArkClient('http://127.0.0.1:4002/api')
99-
client.validators.voters(delegate_id, limit=100, orderBy='timestamp:desc')
99+
client.validators.voters(validator_id, limit=100, orderBy='timestamp:desc')
100100

101101
assert len(responses.calls) == 1
102102
assert responses.calls[0].request.url.startswith('http://127.0.0.1:4002/api/validators/12345/voters?')

0 commit comments

Comments
 (0)