Skip to content

Commit

Permalink
✅ Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexV525 committed May 12, 2024
1 parent 62485e5 commit 5419c7d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions tests/test_blocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

import pytest

from electrumx.lib.coins import Coin
from electrumx.lib.coins import AtomicalsCoin
from electrumx.lib.hash import hex_str_to_hash

BLOCKS_DIR = os.path.join(
Expand All @@ -43,7 +43,7 @@
for name in os.listdir(BLOCKS_DIR):
try:
name_parts = name.split("_")
coin = Coin.lookup_coin_class(name_parts[0], name_parts[1])
coin = AtomicalsCoin.lookup_coin_class(name_parts[0], name_parts[1])
with open(os.path.join(BLOCKS_DIR, name)) as f:
blocks.append((coin, json.load(f)))
except Exception as e:
Expand Down
6 changes: 3 additions & 3 deletions tests/test_transactions.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

import pytest

from electrumx.lib.coins import Coin, Namecoin
from electrumx.lib.coins import AtomicalsCoin, Namecoin
from electrumx.lib.hash import hash_to_hex_str
from electrumx.lib.script import OpCodes, Script

Expand All @@ -25,7 +25,7 @@
for name in os.listdir(TRANSACTION_DIR):
try:
name_parts = name.split("_")
coinFound = Coin.lookup_coin_class(name_parts[0], name_parts[1])
coinFound = AtomicalsCoin.lookup_coin_class(name_parts[0], name_parts[1])
with open(os.path.join(TRANSACTION_DIR, name)) as f:
transactions.append((coinFound, json.load(f)))
except Exception as e:
Expand Down Expand Up @@ -74,4 +74,4 @@ def test_transaction(transaction_details):
normalized_name_op_script.append(OpCodes.OP_2DROP)
normalized_name_op_script.append(OpCodes.OP_DROP)
normalized_name_op_script.append(OpCodes.OP_RETURN)
assert coin.name_hashX_from_script(tx_pks) == Coin.hashX_from_script(normalized_name_op_script)
assert coin.name_hashX_from_script(tx_pks) == AtomicalsCoin.hashX_from_script(normalized_name_op_script)

0 comments on commit 5419c7d

Please sign in to comment.