File tree Expand file tree Collapse file tree 2 files changed +3
-6
lines changed
Expand file tree Collapse file tree 2 files changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,4 @@ def all(self, **kwargs):
66 return self .with_endpoint ('api' ).request_get ('receipts' , kwargs )
77
88 def get (self , transaction_hash : str ):
9- return self .with_endpoint ('api' ).request_get ('receipts' , {
10- 'txHash' : transaction_hash ,
11- })
9+ return self .with_endpoint ('api' ).request_get (f'receipts/{ transaction_hash } ' )
Original file line number Diff line number Diff line change @@ -36,13 +36,12 @@ def test_get_calls_correct_url():
3636 transaction_hash = '12345'
3737 responses .add (
3838 responses .GET ,
39- f'http://127.0.0.1:4002/api/receipts?txHash= { transaction_hash } ' ,
39+ f'http://127.0.0.1:4002/api/receipts/ { transaction_hash } ' ,
4040 json = {'success' : True },
4141 status = 200
4242 )
4343
4444 client = ArkClient ('http://127.0.0.1:4002/api' )
4545 client .receipts .get (transaction_hash )
4646 assert len (responses .calls ) == 1
47- assert responses .calls [0 ].request .url .startswith ('http://127.0.0.1:4002/api/receipts?' )
48- assert f'txHash={ transaction_hash } ' in responses .calls [0 ].request .url
47+ assert responses .calls [0 ].request .url == f'http://127.0.0.1:4002/api/receipts/{ transaction_hash } '
You can’t perform that action at this time.
0 commit comments