Skip to content
Snippets Groups Projects
Commit 38d4cd79 authored by Michał Kudela's avatar Michał Kudela
Browse files

Add tests for operation_get_impacted_accounts method

parent 92e7ffd0
No related branches found
No related tags found
2 merge requests!262Duplicate typeScript tests to python,!230Implementation of the python wax interface
......@@ -51,3 +51,31 @@ def test_operation_get_impacted_accounts(wax: IWaxBaseInterface, operation: Oper
# ASSERT
assert len(result) == EXPECTED_AMOUNT_OF_IMPACTED_ACCOUNTS
assert result[0] == EXPECTED_IMPACTED_ACCOUNT
@pytest.mark.description("Should be able to get impacted accounts from example api operation")
def test_get_operation_impacted_accounts_0(wax: IWaxBaseInterface) -> None:
result = wax.get_operation_impacted_accounts(
operation={
"type": "vote_operation",
"value": {"voter": "otom", "author": "c0ff33a", "permlink": "ewxhnjbj", "weight": 2200},
}
)
assert result == ["c0ff33a", "otom"]
@pytest.mark.description("Should be able to get impacted accounts from example proto operation")
def test_get_operation_impacted_accounts_1(wax: IWaxBaseInterface) -> None:
result = wax.get_operation_impacted_accounts(
operation=operation_pb2.operation(
vote=vote(
author="c0ff33a",
permlink="ewxhnjbj",
voter="otom",
weight=2200,
)
)
)
assert result == ["c0ff33a", "otom"]
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment