Skip to content

Commit

Permalink
fix discrepancies in various tests
Browse files Browse the repository at this point in the history
  • Loading branch information
harisang committed Oct 16, 2024
1 parent cc5aff1 commit 563f83a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions tests/e2e/test_imbalances_script.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

from web3 import Web3

from src.imbalances_script import RawTokenImbalances
from src.raw_imbalances import RawTokenImbalances


def tests_process_single_transaction():
web3 = Web3(Web3.HTTPProvider(getenv("NODE_URL")))
raw_imbalances = RawTokenImbalances(web3, "mainnet")
imbalances = raw_imbalances.compute_imbalances(
imbalances = raw_imbalances.compute_token_imbalances(
"0xb75e03b63d4f06c56549effd503e1e37f3ccfc3c00e6985a5aacc9b0534d7c5c"
)

Expand Down
4 changes: 2 additions & 2 deletions tests/legacy/basic_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import os
from dotenv import load_dotenv
import pytest
from src.imbalances_script import RawTokenImbalances
from src.raw_imbalances import RawTokenImbalances
from src.helpers.helper_functions import get_web3_instance

load_dotenv()
Expand Down Expand Up @@ -54,6 +54,6 @@ def test_imbalances(tx_hash, expected_imbalances):
"""
chain_name = os.getenv("CHAIN_NAME")
rt = RawTokenImbalances(get_web3_instance(), chain_name)
imbalances = rt.compute_imbalances(tx_hash)
imbalances = rt.compute_token_imbalances(tx_hash)
for token_address, expected_imbalance in expected_imbalances.items():
assert imbalances.get(token_address) == expected_imbalance
2 changes: 1 addition & 1 deletion tests/legacy/compare_imbalances.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import time
from web3 import Web3
from src.helpers.config import ETHEREUM_NODE_URL
from src.imbalances_script import RawTokenImbalances
from src.raw_imbalances import RawTokenImbalances
from src.balanceof_imbalances import BalanceOfImbalances
from src.daemon import get_web3_instance, create_db_connection, fetch_transaction_hashes

Expand Down

0 comments on commit 563f83a

Please sign in to comment.