@@ -328,6 +328,19 @@ def block(context, block, response_format):
328328 )
329329
330330
331+ @when (
332+ 'we make a Get Block call for round {round} with format "{response_format}" and header-only "{header_only}"'
333+ )
334+ def block (context , round , response_format , header_only ):
335+ bool_opt = None
336+ if header_only == "true" :
337+ bool_opt = True
338+
339+ context .response = context .acl .block_info (
340+ int (round ), response_format = response_format , header_only = bool_opt
341+ )
342+
343+
331344@when ("we make any Get Block call" )
332345def block_any (context ):
333346 context .response = context .acl .block_info (3 , response_format = "msgpack" )
@@ -339,6 +352,17 @@ def parse_block(context, pool):
339352 assert context .response ["block" ]["rwd" ] == pool
340353
341354
355+ @then (
356+ 'the parsed Get Block response should have rewards pool "{pool}" and no certificate or payset'
357+ )
358+ def parse_block_header (context , pool ):
359+ context .response = json .loads (context .response )
360+ assert context .response ["block" ]["rwd" ] == pool
361+ assert (
362+ "cert" not in context .response
363+ ), f"Key 'cert' unexpectedly found in dictionary"
364+
365+
342366@then (
343367 'the parsed Get Block response should have heartbeat address "{hb_address}"'
344368)
@@ -654,7 +678,6 @@ def parse_txns_by_addr(context, roundNum, length, idx, sender):
654678 'we make a Lookup Block call against round {block:d} and header "{headerOnly:MaybeBool}"'
655679)
656680def lookup_block (context , block , headerOnly ):
657- print ("Header only = " + str (headerOnly ))
658681 context .response = context .icl .block_info (
659682 block = block , header_only = headerOnly
660683 )
0 commit comments