home · contact · privacy
Re-write caching.
[plomtask] / tests / utils.py
index c80b34da9f3405ddabf563e577e8406af4e155eb..63b07e93e6f14ca51426e2fc00e959fdbfca7bf1 100644 (file)
@@ -8,12 +8,21 @@ from os import remove as remove_file
 from typing import Mapping
 from plomtask.db import DatabaseFile, DatabaseConnection
 from plomtask.http import TaskHandler, TaskServer
+from plomtask.processes import Process, ProcessStep
+from plomtask.conditions import Condition
+from plomtask.days import Day
+from plomtask.todos import Todo
 
 
 class TestCaseWithDB(TestCase):
     """Module tests not requiring DB setup."""
 
     def setUp(self) -> None:
+        Condition.empty_cache()
+        Day.empty_cache()
+        Process.empty_cache()
+        ProcessStep.empty_cache()
+        Todo.empty_cache()
         timestamp = datetime.now().timestamp()
         self.db_file = DatabaseFile(f'test_db:{timestamp}')
         self.db_file.remake()