diff --git a/tests/backend/api/test_fetcher.py b/tests/backend/api/test_fetcher.py index 1cbbd98..0ec4d85 100644 --- a/tests/backend/api/test_fetcher.py +++ b/tests/backend/api/test_fetcher.py @@ -22,10 +22,10 @@ async def this_fetcher(dbsession): global fetcher q = sa.insert(db_models.Fetcher).values(**fetcher).returning(db_models.Fetcher) - fetcher = dbsession.scalar(q) + fetcher_db = dbsession.scalar(q) dbsession.flush() - yield fetcher.id_ + yield fetcher_db.id_ q = sa.delete(db_models.Fetcher).where(db_models.Fetcher.id_ == id) dbsession.execute(q) diff --git a/tests/backend/api/test_metric.py b/tests/backend/api/test_metric.py index 9ee65c6..39ffd03 100644 --- a/tests/backend/api/test_metric.py +++ b/tests/backend/api/test_metric.py @@ -13,10 +13,10 @@ async def this_metric(dbsession): global metric q = sa.insert(db_models.Metric).values(**metric).returning(db_models.Metric) - metric = dbsession.scalar(q) + metric_db = dbsession.scalar(q) dbsession.flush() - yield metric.id_ + yield metric_db.id_ q = sa.delete(db_models.Metric).where(db_models.Metric.id_ == id) dbsession.execute(q) diff --git a/tests/backend/api/test_reciever.py b/tests/backend/api/test_reciever.py index 5b37ce9..ce4aab3 100644 --- a/tests/backend/api/test_reciever.py +++ b/tests/backend/api/test_reciever.py @@ -15,11 +15,11 @@ @pytest_asyncio.fixture async def this_receiver(dbsession): global receiver - q = sa.insert(db_models.Receiver).values(**receiver.model_dump()).returning(db_models.Receiver) - receiver = dbsession.execute(q).scalar() + q = sa.insert(db_models.Receiver).values(**receiver).returning(db_models.Receiver) + receiver_db = dbsession.execute(q).scalar() dbsession.flush() - yield receiver.id_ + yield receiver_db.id_ q = sa.delete(db_models.Receiver).where(db_models.Receiver.id_ == id) dbsession.execute(q)