Fiddle with action

This commit is contained in:
stijndcl 2022-06-17 00:43:55 +02:00
parent 6d61056dc4
commit 00e805d535
7 changed files with 67 additions and 15 deletions

15
tests/conftest.py Normal file
View file

@ -0,0 +1,15 @@
import pytest
from alembic import command, config
@pytest.fixture(scope="session")
def tables():
"""Initialize a database before the tests, and then tear it down again
Starts from an empty database and runs through all the migrations to check those as well
while we're at it
"""
alembic_config = config.Config("alembic.ini")
command.upgrade(alembic_config, "head")
yield
command.downgrade(alembic_config, "base")

View file

@ -1,2 +1,5 @@
def test_dummy():
assert True
import settings
def test_dummy(tables):
assert settings.DB_TEST_SQLITE