backend modified

This commit is contained in:
ari committed 2022-08-15 21:56:48 -04:00
1 parent d96c1fb953
commit 55ea1e23a4
26 files changed
+737 -1145

No files matched your search

+19
View File
@@ -0,0 +1,19 @@
from pathlib import Path
from tempfile import mktemp
from unittest import TestCase
from src.automations.db import AutomationDBConnection
def make_temp_db():
return AutomationDBConnection(Path(mktemp() + ".db"))
class TestWithDB(TestCase):
def setUp(self) -> None:
self.db = make_temp_db()
self.db.create_db()
self.db_file = self.db.db_file
def tearDown(self) -> None:
self.db_file.unlink()