mirror of
https://github.com/stijndcl/didier.git
synced 2026-04-07 23:55:46 +02:00
Scraping & parsing for Steam
This commit is contained in:
parent
deefeb1106
commit
855f60727b
10 changed files with 338 additions and 21 deletions
17
tests/test_database/test_crud/test_free_games.py
Normal file
17
tests/test_database/test_crud/test_free_games.py
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
from sqlalchemy import select
|
||||
from sqlalchemy.ext.asyncio import AsyncSession
|
||||
|
||||
from database.crud import free_games as crud
|
||||
from database.schemas import FreeGame
|
||||
|
||||
|
||||
async def test_add_games(postgres: AsyncSession):
|
||||
"""Test adding new games"""
|
||||
statement = select(FreeGame)
|
||||
games = (await postgres.execute(statement)).scalars().all()
|
||||
assert not games
|
||||
|
||||
await crud.add_free_games(postgres, [1, 2, 3, 4])
|
||||
|
||||
games = (await postgres.execute(statement)).scalars().all()
|
||||
assert len(games) == 4
|
||||
Loading…
Add table
Add a link
Reference in a new issue