Skip to content

Commit 7fbfe8f

Browse files
author
Roman
committed
fix tests
1 parent 9861b11 commit 7fbfe8f

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

tests/unit_tests/extrinsics/test__init__.py

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,31 @@
44

55

66
def test_format_error_message_with_right_error_message():
7-
"""Verify that error message from extrinsic response parses correctly."""
7+
"""Verify that an error message from extrinsic response parses correctly."""
88
# Prep
99
fake_error_message = {
1010
"type": "SomeType",
1111
"name": "SomeErrorName",
12-
"docs": ["Some error description."],
12+
"docs": [
13+
"Some error description.",
14+
"I'm second part.",
15+
"Hah, I'm the last one.",
16+
],
1317
}
1418

1519
# Call
1620
result = format_error_message(fake_error_message)
1721

1822
# Assertions
1923

20-
assert "SomeType" in result
21-
assert "SomeErrorName" in result
22-
assert "Some error description." in result
24+
assert (
25+
result
26+
== "Subtensor returned `SomeErrorName(SomeType)` error. This means: `Some error description. I'm second part. Hah, I'm the last one.`."
27+
)
2328

2429

2530
def test_format_error_message_with_empty_error_message():
26-
"""Verify that empty error message from extrinsic response parses correctly."""
31+
"""Verify that an empty error message from extrinsic response parses correctly."""
2732
# Prep
2833
fake_error_message = {}
2934

0 commit comments

Comments
 (0)