Skip to content

Commit 6ec965e

Browse files
committed
refactor: rename token_addresses to tokens_for
1 parent 5af8b33 commit 6ec965e

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

client/api/wallets.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def tokens(self, wallet_id, page=None, limit=100):
5757
}
5858
return self.with_endpoint('api').request_get(f'wallets/{wallet_id}/tokens', params)
5959

60-
def token_addresses(self, addresses, page=None, limit=100):
60+
def tokens_for(self, addresses, page=None, limit=100):
6161
params = {
6262
'addresses': addresses,
6363
'page': page,

tests/api/test_wallets.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ def test_tokens_calls_correct_url_with_passed_in_params():
278278
assert 'limit=69' in responses.calls[0].request.url
279279

280280

281-
def test_token_addresses_calls_correct_url_with_default_params():
281+
def test_tokens_for_calls_correct_url_with_default_params():
282282
responses.add(
283283
responses.GET,
284284
'http://127.0.0.1:4002/api/wallets/tokens',
@@ -287,7 +287,7 @@ def test_token_addresses_calls_correct_url_with_default_params():
287287
)
288288

289289
client = ArkClient('http://127.0.0.1:4002/api')
290-
client.wallets.token_addresses('0xabc,0xdef')
290+
client.wallets.tokens_for('0xabc,0xdef')
291291
assert len(responses.calls) == 1
292292
assert responses.calls[0].request.url.startswith(
293293
'http://127.0.0.1:4002/api/wallets/tokens?'
@@ -296,7 +296,7 @@ def test_token_addresses_calls_correct_url_with_default_params():
296296
assert 'limit=100' in responses.calls[0].request.url
297297

298298

299-
def test_token_addresses_calls_correct_url_with_passed_in_params():
299+
def test_tokens_for_calls_correct_url_with_passed_in_params():
300300
responses.add(
301301
responses.GET,
302302
'http://127.0.0.1:4002/api/wallets/tokens',
@@ -305,7 +305,7 @@ def test_token_addresses_calls_correct_url_with_passed_in_params():
305305
)
306306

307307
client = ArkClient('http://127.0.0.1:4002/api')
308-
client.wallets.token_addresses('0xabc,0xdef', page=2, limit=50)
308+
client.wallets.tokens_for('0xabc,0xdef', page=2, limit=50)
309309
assert len(responses.calls) == 1
310310
assert responses.calls[0].request.url.startswith(
311311
'http://127.0.0.1:4002/api/wallets/tokens?'

0 commit comments

Comments
 (0)