@@ -251,6 +251,7 @@ class TestAGChannels(BaseTest):
251251 def setUp (self ):
252252 super ().setUp ()
253253 self .org_id = "SNet"
254+ self .org_2_id = "singularitynet"
254255 self .amount = "0.001"
255256 self .password = "12345"
256257 self .group = "default_group"
@@ -260,18 +261,17 @@ def setUp(self):
260261 for line in lines :
261262 parts = line .split ()
262263 if len (parts ) >= 6 and parts [0 ].isdigit () and parts [- 1 ].isdigit ():
263- channel_id , expiration = parts [0 ], int (parts [- 1 ])
264- if parts [6 ] == "0" :
265- self .max_id = channel_id
264+ self .max_id = parts [0 ]
266265
267266 def test_channel_1_extend (self ):
268267 execute (["account" , "deposit" , self .amount , "-y" , "-q" ], self .parser , self .conf )
269268 if self .max_id :
270269 result1 = execute (["channel" , "extend-add" , self .max_id , "--amount" , self .amount , "-y" ], self .parser , self .conf )
271270 else :
272271 block_number = int (execute (["channel" , "block-number" ], self .parser , self .conf ))
273- channel_open_output = execute (["channel" , "open" , self .org_id , self .group , self .amount , f"{ block_number - 1 } " , "-y" , "--open-new-anyway" ], self .parser , self .conf )
274- self .max_id = str (re .search (r"#channel_id\s+(\d+)" , channel_open_output ))
272+ channel_open_output = execute (["channel" , "open" , self .org_id , self .group , self .amount , f"{ block_number + 10000 } " , "-y" , "--open-new-anyway" ], self .parser , self .conf )
273+ match = re .search (r"#channel_id\s+(\d+)" , channel_open_output )
274+ self .max_id = match .group (1 )
275275 execute (["channel" , "extend-add" , self .max_id , "--amount" , self .amount , "-y" ], self .parser , self .conf )
276276 result1 = execute (["channel" , "extend-add" , self .max_id , "--amount" , self .amount , "-y" ], self .parser ,
277277 self .conf )
@@ -297,7 +297,6 @@ def test_channel_5_print_filter_recipient(self):
297297 assert "Channels for recipient:" , ADDR in result
298298
299299 def test_channel_5_claim (self ):
300- print (self .max_id )
301300 execute (["account" , "deposit" , self .amount , "-y" , "-q" ], self .parser , self .conf )
302301 if self .max_id :
303302 execute (["channel" , "extend-add" , self .max_id , "--amount" , self .amount , "-y" ], self .parser , self .conf )
0 commit comments