mirror of
https://github.com/fhswf/aki_prj23_transparenzregister.git
synced 2025-06-22 09:53:55 +02:00
Replaced the bind with the connection method
This commit is contained in:
@ -13,10 +13,10 @@ def test_reset_sql_all(full_db: Session) -> None:
|
||||
"""Tests if all sql tables are reset."""
|
||||
reset_sql.reset_tables(all_tables=True, db=full_db)
|
||||
assert pd.read_sql_table(
|
||||
entities.MissingCompany.__tablename__, con=full_db.bind # type:ignore
|
||||
entities.MissingCompany.__tablename__, con=full_db.connection()
|
||||
).empty
|
||||
assert pd.read_sql_table(
|
||||
entities.Company.__tablename__, con=full_db.bind # type:ignore
|
||||
entities.Company.__tablename__, con=full_db.connection()
|
||||
).empty
|
||||
|
||||
|
||||
@ -24,10 +24,10 @@ def test_reset_sql(full_db: Session) -> None:
|
||||
"""Tests if only most sql tables are reset."""
|
||||
reset_sql.reset_tables(all_tables=False, db=full_db)
|
||||
assert pd.read_sql_table(
|
||||
entities.Company.__tablename__, con=full_db.bind # type:ignore
|
||||
entities.Company.__tablename__, con=full_db.connection()
|
||||
).empty
|
||||
assert not pd.read_sql_table(
|
||||
entities.MissingCompany.__tablename__, con=full_db.bind # type:ignore
|
||||
entities.MissingCompany.__tablename__, con=full_db.connection()
|
||||
).empty
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user