From d399f7e86198484a614602b543ce8349571b4955 Mon Sep 17 00:00:00 2001 From: Kevin Heavey Date: Mon, 31 Oct 2022 12:00:53 +0000 Subject: [PATCH] fix tests --- tests/integration/test_async_token_client.py | 4 +--- tests/integration/test_memo.py | 4 +--- tests/integration/test_token_client.py | 4 +--- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/tests/integration/test_async_token_client.py b/tests/integration/test_async_token_client.py index 0a6d04de..873ff715 100644 --- a/tests/integration/test_async_token_client.py +++ b/tests/integration/test_async_token_client.py @@ -1,7 +1,5 @@ # pylint: disable=R0401 """Tests for the SPL Token Client.""" -from json import loads - import pytest import spl.token._layouts as layouts @@ -281,7 +279,7 @@ async def test_get_accounts(stubbed_sender, test_token): # pylint: disable=rede assert len(resp.value) == 2 for resp_data in resp.value: assert resp_data.pubkey - parsed_data = loads(resp_data.account.data.parsed)["info"] + parsed_data = resp_data.account.data.parsed["info"] assert parsed_data["owner"] == str(stubbed_sender.public_key) diff --git a/tests/integration/test_memo.py b/tests/integration/test_memo.py index c79a3ab0..da02c6a2 100644 --- a/tests/integration/test_memo.py +++ b/tests/integration/test_memo.py @@ -1,6 +1,4 @@ """Tests for the Memo program.""" -from json import loads - import pytest from solders.transaction_status import ParsedInstruction @@ -46,5 +44,5 @@ def test_send_memo_in_transaction(stubbed_sender: Keypair, test_http_client: Cli assert log_message[1] == raw_message ixn = resp2_transaction.transaction.message.instructions[0] assert isinstance(ixn, ParsedInstruction) - assert loads(ixn.parsed) == raw_message + assert ixn.parsed == raw_message assert ixn.program_id == MEMO_PROGRAM_ID.to_solders() diff --git a/tests/integration/test_token_client.py b/tests/integration/test_token_client.py index 44205d5f..7cdf464a 100644 --- a/tests/integration/test_token_client.py +++ b/tests/integration/test_token_client.py @@ -1,7 +1,5 @@ # pylint: disable=R0401 """Tests for the SPL Token Client.""" -from json import loads - import pytest import spl.token._layouts as layouts @@ -274,7 +272,7 @@ def test_get_accounts(stubbed_sender, test_token): # pylint: disable=redefined- assert len(resp.value) == 2 for resp_data in resp.value: assert PublicKey(resp_data.pubkey) - parsed_data = loads(resp_data.account.data.parsed)["info"] + parsed_data = resp_data.account.data.parsed["info"] assert parsed_data["owner"] == str(stubbed_sender.public_key)