Skip to content

Commit 5ca6eab

Browse files
committed
[SPT-777] Fixed errors and added logs
1 parent 9bc1ce4 commit 5ca6eab

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

snet/cli/test/functional_tests/func_tests.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -244,28 +244,31 @@ def setUp(self):
244244
self.amount="0.001"
245245
self.password="12345"
246246
self.group="default_group"
247-
data=execute(["channel", "print-filter-group", self.org_id,"default_group"], self.parser, self.conf)
247+
data=execute(["channel", "print-filter-group", self.org_id, "default_group"], self.parser, self.conf)
248+
print("data:", data)
248249
first_column = [int(line.split()[0]) for line in data.splitlines()[2:]]
250+
print(first_column)
249251
self.max_id=str(max(first_column))
250252

251253
def test_channel_1_extend(self):
252-
execute(["account", "deposit", self.amount, "-y", "-q"], self.parser, self.conf)
253254
result1=execute(["channel", "extend-add", self.max_id, "--amount", self.amount, "-y"], self.parser, self.conf)
254255
""" TODO KeyError: 'channelId'
255256
result2 = execute(["channel", "extend-add-for-org", self.org_id, "default_group", "--channel-id", f"{self.max_id}", "-y"], self.parser, self.conf)
256257
print(result2)"""
258+
print(self.max_id)
257259
assert f"channelId: ", self.max_id in result1
258260

259261
def test_channel_2_print(self):
260262
result1=execute(["channel", "print-filter-sender"], self.parser, self.conf)
261263
result2= execute(["channel", "print-filter-group", self.org_id, self.group], self.parser, self.conf)
262264
result3=execute(["channel", "print-filter-group-sender", self.org_id, self.group], self.parser, self.conf)
263-
assert self.max_id in result1 and result2 and result3
264-
265+
assert self.max_id in result1 and self.max_id in result2 and self.max_id in result3
265266

266267
def test_channel_3_claim(self):
268+
execute(["account", "deposit", self.amount, "-y", "-q"], self.parser, self.conf)
267269
execute(["channel", "extend-add", self.max_id, "--amount", self.amount, "-y"], self.parser, self.conf)
268270
result1=execute(["channel", "claim-timeout", f"{self.max_id}", "-y"], self.parser, self.conf)
271+
execute(["account", "deposit", self.amount, "-y", "-q"], self.parser, self.conf)
269272
execute(["channel", "extend-add", self.max_id, "--amount", self.amount, "-y"], self.parser, self.conf)
270273
result2=execute(["channel", "claim-timeout-all", "-y"], self.parser, self.conf)
271274
assert ("event: ChannelSenderClaim" in result1) and ("event: ChannelSenderClaim" in result2)

0 commit comments

Comments
 (0)