@@ -20,14 +20,21 @@ def __init__(self, seconds: int, nanos: int = 0):
2020 self .seconds = seconds
2121 self .nanos = nanos
2222
23+ class MockAccountID :
24+ """Mocks the protobuf AccountID object."""
25+ def __init__ (self , shard , realm , num ):
26+ self .shardNum = shard
27+ self .realmNum = realm
28+ self .accountNum = num
29+ self .alias = None
30+
2331class MockTransactionID :
2432 """Mocks the protobuf TransactionID object."""
2533 def __init__ (self , account_id , seconds , nanos ):
2634
27- self .shardNum = account_id .shard
28- self .realmNum = account_id .realm
29- self .accountNum = account_id .num
35+ self .accountID = account_id
3036 self .transactionValidStart = MockTimestamp (seconds , nanos )
37+ self .scheduled = False
3138
3239class MockChunkInfo :
3340 """Mocks the protobuf ChunkInfo object."""
@@ -72,13 +79,7 @@ def mock_consensus_response(
7279
7380 chunk_info = None
7481 if is_chunked :
75-
76- class MockAcct :
77- shard = 0
78- realm = 0
79- num = 10
80-
81- tx_id = MockTransactionID (MockAcct (), 1736539100 , 1 ) if has_tx_id else None
82+ tx_id = MockTransactionID (MockAccountID (0 ,0 ,10 ), 1736539100 , 1 ) if has_tx_id else None
8283 chunk_info = MockChunkInfo (seq , total_chunks , tx_id )
8384
8485 return MockResponse (message , seq , timestamp , chunk_info )
0 commit comments