build: add ruff and format code
This commit is contained in:
parent
afadffbaac
commit
9d24f79436
20 changed files with 122 additions and 60 deletions
|
@ -1,11 +1,10 @@
|
|||
import pytest
|
||||
import pytest_asyncio
|
||||
from sqlalchemy import text, delete
|
||||
from sqlalchemy import delete, text
|
||||
|
||||
from foxnouns.db import Base
|
||||
from foxnouns.settings import DATABASE
|
||||
|
||||
|
||||
# Override the database name to the testing database
|
||||
DATABASE["NAME"] = f"{DATABASE['NAME']}_test"
|
||||
|
||||
|
@ -25,8 +24,8 @@ def pytest_collection_modifyitems(items):
|
|||
def setup():
|
||||
"""Migrate the testing database to the latest migration, and once the tests complete, clear the database again."""
|
||||
|
||||
from foxnouns.db.sync import engine
|
||||
from alembic import command, config
|
||||
from foxnouns.db.sync import engine
|
||||
|
||||
cfg = config.Config("alembic.ini")
|
||||
cfg.attributes["connection"] = engine.connect()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue