Files
Shortumation/api/tests/unittests/automations_v2/utils.py
T
2022-08-14 00:24:44 -04:00

16 lines
392 B
Python

from pathlib import Path
from unittest import TestCase
from tempfile import mktemp
from src.automations_v2.db import AutomationDBConnection
class TestWithDB(TestCase):
def setUp(self) -> None:
self.db_file = Path(mktemp() + ".db")
self.db = AutomationDBConnection(self.db_file)
self.db.create_db()
def tearDown(self) -> None:
self.db_file.unlink()