Skip to content

Commit

Permalink
Text fix v2
Browse files Browse the repository at this point in the history
  • Loading branch information
Wudext committed Oct 9, 2024
1 parent ed1a742 commit 0c413fa
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions tests/backend/api/test_fetcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions tests/backend/api/test_metric.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 3 additions & 3 deletions tests/backend/api/test_reciever.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 0c413fa

Please sign in to comment.