Skip to content

Commit

Permalink
Update error message checking
Browse files Browse the repository at this point in the history
  • Loading branch information
bingyanglin committed Apr 13, 2021
1 parent f84c97d commit c973e53
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions bindings/python/native/tests/test_full_node_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ def test_get_health():

def test_get_info():
node_info = client.get_info()
assert isinstance(node_info, dict) and 'is_healthy' in node_info['nodeinfo']
assert isinstance(
node_info, dict) and 'is_healthy' in node_info['nodeinfo']


def test_get_peers():
Expand All @@ -30,7 +31,7 @@ def test_get_peers():
assert isinstance(peers, list)
except ValueError as e:
# Else the error must be access forbidden
assert "access forbidden, error: forbidden" in str(e)
assert "Forbidden" in str(e)


def test_get_tips():
Expand Down Expand Up @@ -95,7 +96,7 @@ def test_get_receipts():
assert isinstance(receipt, list)
except ValueError as e:
# Else the error must be access forbidden
assert "access forbidden, error: forbidden" in str(e)
assert "Forbidden" in str(e)


def test_get_receipts_migrated_at():
Expand All @@ -105,7 +106,7 @@ def test_get_receipts_migrated_at():
assert isinstance(receipts, list)
except ValueError as e:
# Else the error must be access forbidden
assert "access forbidden, error: forbidden" in str(e)
assert "Forbidden" in str(e)


def test_get_treasury():
Expand Down

0 comments on commit c973e53

Please sign in to comment.