WebHost: Add deletion of old content to cleanup function (#6119)

---------

Co-authored-by: black-sliver <59490463+black-sliver@users.noreply.github.com>
This commit is contained in:
Fabian Dill
2026-05-01 22:38:46 +02:00
committed by GitHub
parent 234b0581c9
commit a68109f5a7
4 changed files with 122 additions and 3 deletions
+5
View File
@@ -33,4 +33,9 @@ class TestBase(unittest.TestCase):
cls.app = raw_app
def setUp(self) -> None:
from WebHostLib.models import db
from pony.orm import db_session
with db_session:
for entity in db.entities.values():
entity.select().delete(bulk=True)
self.client = self.app.test_client()