mirror of
https://github.com/fhswf/aki_prj23_transparenzregister.git
synced 2025-12-17 18:50:44 +01:00
Replaced the bind with the connection method
This commit is contained in:
@@ -130,7 +130,7 @@ def test_transfer_news_to_sql(full_db: Session, monkeypatch: MonkeyPatch) -> Non
|
||||
lambda _: NEWS_TEXTS,
|
||||
)
|
||||
transfer_news._transfer_news_to_sql(None, full_db) # type: ignore
|
||||
articles = pd.read_sql_table(entities.News.__tablename__, full_db.bind) # type: ignore
|
||||
articles = pd.read_sql_table(entities.News.__tablename__, full_db.connection()) # type: ignore
|
||||
assert "text" in articles.columns
|
||||
del articles["text"]
|
||||
assert articles.to_dict(orient="records") == [
|
||||
@@ -158,7 +158,7 @@ def test_transfer_news_to_sql(full_db: Session, monkeypatch: MonkeyPatch) -> Non
|
||||
},
|
||||
]
|
||||
pd.testing.assert_frame_equal(
|
||||
pd.read_sql_table(entities.Sentiment.__tablename__, full_db.bind), # type: ignore
|
||||
pd.read_sql_table(entities.Sentiment.__tablename__, full_db.connection()),
|
||||
pd.DataFrame(
|
||||
[
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user