@@ -99,23 +99,6 @@ def test_last_calls_correct_url():
9999 assert responses .calls [0 ].request .url == 'http://127.0.0.1:4002/api/blocks/last'
100100
101101
102- def test_transactions_calls_correct_url_with_default_params ():
103- block_id = '12345'
104- responses .add (
105- responses .GET ,
106- 'http://127.0.0.1:4002/api/blocks/{}/transactions' .format (block_id ),
107- json = {'success' : True },
108- status = 200
109- )
110-
111- client = ArkClient ('http://127.0.0.1:4002/api' )
112- client .blocks .transactions (block_id )
113- assert len (responses .calls ) == 1
114- assert responses .calls [0 ].request .url == (
115- 'http://127.0.0.1:4002/api/blocks/12345/transactions?limit=100'
116- )
117-
118-
119102def test_transactions_calls_correct_url_with_passed_in_params ():
120103 block_id = '12345'
121104 responses .add (
@@ -126,10 +109,11 @@ def test_transactions_calls_correct_url_with_passed_in_params():
126109 )
127110
128111 client = ArkClient ('http://127.0.0.1:4002/api' )
129- client .blocks .transactions (block_id , page = 5 , limit = 69 )
112+ client .blocks .transactions (block_id , page = 5 , limit = 69 , orderBy = "timestamp.epoch" )
130113 assert len (responses .calls ) == 1
131114 assert responses .calls [0 ].request .url .startswith (
132115 'http://127.0.0.1:4002/api/blocks/12345/transactions?'
133116 )
134117 assert 'page=5' in responses .calls [0 ].request .url
135118 assert 'limit=69' in responses .calls [0 ].request .url
119+ assert 'orderBy=timestamp.epoch' in responses .calls [0 ].request .url
0 commit comments