Skip to content

Commit ed7a97d

Browse files
committed
Add tables creation to the test
1 parent cb3a3f1 commit ed7a97d

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed
2 Bytes
Binary file not shown.

tests/conftest.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
from unittest.mock import MagicMock
44

55
import pytest
6+
from piccolo.apps.migrations.commands.forwards import run_forwards
67

78
from tests.test_apps.mega.tables import MegaTable, SmallTable
89
from tests.test_apps.music.tables import (
@@ -29,6 +30,13 @@ def anyio_backend() -> str:
2930
return "asyncio"
3031

3132

33+
@pytest.fixture(autouse=True, scope="session")
34+
async def _migrate_forward() -> None:
35+
applications: typing.Final = ["mega", "music"]
36+
for application_name in applications:
37+
await run_forwards(app_name=application_name)
38+
39+
3240
@pytest.fixture(autouse=True)
3341
async def _clean_up() -> None:
3442
tables_to_clean: typing.Final[list[Table]] = [

0 commit comments

Comments
 (0)