Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin Heavey authored and Kevin Heavey committed Oct 31, 2022
1 parent e2e8395 commit d399f7e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 9 deletions.
4 changes: 1 addition & 3 deletions tests/integration/test_async_token_client.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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)


Expand Down
4 changes: 1 addition & 3 deletions tests/integration/test_memo.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
"""Tests for the Memo program."""
from json import loads

import pytest
from solders.transaction_status import ParsedInstruction

Expand Down Expand Up @@ -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()
4 changes: 1 addition & 3 deletions tests/integration/test_token_client.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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)


Expand Down

0 comments on commit d399f7e

Please sign in to comment.