Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions client/api/wallets.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ def transactions(self, wallet_id, page=None, limit=100, **kwargs):
}
return self.with_endpoint('api').request_get(f'wallets/{wallet_id}/transactions', params)

def transactions_sent(self, wallet_id, page=None, limit=100):
def sent_transactions(self, wallet_id, page=None, limit=100):
params = {
'page': page,
'limit': limit,
}
return self.with_endpoint('api').request_get(f'wallets/{wallet_id}/transactions/sent', params)

def transactions_received(self, wallet_id, page=None, limit=100):
def received_transactions(self, wallet_id, page=None, limit=100):
params = {
'page': page,
'limit': limit,
Expand Down
16 changes: 8 additions & 8 deletions tests/api/test_wallets.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def test_transactions_calls_correct_url_with_passed_in_params():
assert 'limit=69' in responses.calls[0].request.url


def test_transactions_sent_calls_correct_url_with_default_params():
def test_sent_transactions_calls_correct_url_with_default_params():
wallet_id = '12345'
responses.add(
responses.GET,
Expand All @@ -144,14 +144,14 @@ def test_transactions_sent_calls_correct_url_with_default_params():
)

client = ArkClient('http://127.0.0.1:4002/api')
client.wallets.transactions_sent(wallet_id)
client.wallets.sent_transactions(wallet_id)
assert len(responses.calls) == 1
assert responses.calls[0].request.url == (
'http://127.0.0.1:4002/api/wallets/12345/transactions/sent?limit=100'
)


def test_transactions_sent_calls_correct_url_with_passed_in_params():
def test_sent_transactions_calls_correct_url_with_passed_in_params():
wallet_id = '12345'
responses.add(
responses.GET,
Expand All @@ -161,7 +161,7 @@ def test_transactions_sent_calls_correct_url_with_passed_in_params():
)

client = ArkClient('http://127.0.0.1:4002/api')
client.wallets.transactions_sent(wallet_id, page=5, limit=69)
client.wallets.sent_transactions(wallet_id, page=5, limit=69)
assert len(responses.calls) == 1
assert responses.calls[0].request.url.startswith(
'http://127.0.0.1:4002/api/wallets/12345/transactions/sent?'
Expand All @@ -170,7 +170,7 @@ def test_transactions_sent_calls_correct_url_with_passed_in_params():
assert 'limit=69' in responses.calls[0].request.url


def test_transactions_received_calls_correct_url_with_default_params():
def test_received_transactions_calls_correct_url_with_default_params():
wallet_id = '12345'
responses.add(
responses.GET,
Expand All @@ -180,14 +180,14 @@ def test_transactions_received_calls_correct_url_with_default_params():
)

client = ArkClient('http://127.0.0.1:4002/api')
client.wallets.transactions_received(wallet_id)
client.wallets.received_transactions(wallet_id)
assert len(responses.calls) == 1
assert responses.calls[0].request.url == (
'http://127.0.0.1:4002/api/wallets/12345/transactions/received?limit=100'
)


def test_transactions_received_calls_correct_url_with_passed_in_params():
def test_received_transactions_calls_correct_url_with_passed_in_params():
wallet_id = '12345'
responses.add(
responses.GET,
Expand All @@ -197,7 +197,7 @@ def test_transactions_received_calls_correct_url_with_passed_in_params():
)

client = ArkClient('http://127.0.0.1:4002/api')
client.wallets.transactions_received(wallet_id, page=5, limit=69)
client.wallets.received_transactions(wallet_id, page=5, limit=69)
assert len(responses.calls) == 1
assert responses.calls[0].request.url.startswith(
'http://127.0.0.1:4002/api/wallets/12345/transactions/received?'
Expand Down