From 77e2871264d37c05a6a99950d6e0d1db4a56432a Mon Sep 17 00:00:00 2001 From: Keiran Price Date: Thu, 20 Jun 2024 14:15:23 +0100 Subject: [PATCH] Create table in test env --- test/e2e/conftest.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 test/e2e/conftest.py diff --git a/test/e2e/conftest.py b/test/e2e/conftest.py new file mode 100644 index 0000000..4617217 --- /dev/null +++ b/test/e2e/conftest.py @@ -0,0 +1,13 @@ +import pytest + +from src.db import ENGINE, Base + + +@pytest.fixture(scope="session", autouse=True) +def _setup(): + """ + Setup database pre-testing + :return: + """ + Base.metadata.drop_all(ENGINE) + Base.metadata.create_all(ENGINE)