Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
fhenneke committed Oct 10, 2024
1 parent 52392c8 commit d76b4b9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/token_decimals.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def update_token_decimals(engine, web3) -> None:


if __name__ == "__main__":
engine = create_engine(f"postgresql+psycopg2://{getenv('SOLVER_SLIPPAGE_DB_URL')}")
engine = create_engine(f"postgresql+psycopg://{getenv('SOLVER_SLIPPAGE_DB_URL')}")
web3 = Web3(Web3.HTTPProvider(getenv("NODE_URL")))

update_token_decimals(engine, web3)
8 changes: 4 additions & 4 deletions tests/unit/test_database.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

def tests_write_transaction_timestamp():
engine = create_engine(
f"postgresql+psycopg2://postgres:postgres@localhost:5432/mainnet"
f"postgresql+psycopg://postgres:postgres@localhost:5432/mainnet"
)
db = Database(engine, "mainnet")
# truncate table
Expand Down Expand Up @@ -38,7 +38,7 @@ def tests_write_transaction_tokens():
# import has to happen after patching environment variable

engine = create_engine(
f"postgresql+psycopg2://postgres:postgres@localhost:5432/mainnet"
f"postgresql+psycopg://postgres:postgres@localhost:5432/mainnet"
)
db = Database(engine, "mainnet")
transaction_tokens = [
Expand Down Expand Up @@ -69,7 +69,7 @@ def tests_write_transaction_tokens():

def tests_write_prices():
engine = create_engine(
f"postgresql+psycopg2://postgres:postgres@localhost:5432/mainnet"
f"postgresql+psycopg://postgres:postgres@localhost:5432/mainnet"
)
db = Database(engine, "mainnet")
token_prices = [
Expand Down Expand Up @@ -109,7 +109,7 @@ def test_get_latest_transaction():
from src.helpers.database import Database

engine = create_engine(
f"postgresql+psycopg2://postgres:postgres@localhost:5432/mainnet"
f"postgresql+psycopg://postgres:postgres@localhost:5432/mainnet"
)
db = Database(engine, "mainnet")
# truncate table
Expand Down

0 comments on commit d76b4b9

Please sign in to comment.