feat(sqlalchemy): format backend

This commit is contained in:
Jonathan Rohde
2024-06-24 13:55:18 +02:00
parent 2fb27adbf6
commit d88bd51e3c
8 changed files with 153 additions and 142 deletions

View File

@@ -91,6 +91,7 @@ class TestChats(AbstractPostgresTest):
def test_get_user_archived_chats(self):
self.chats.archive_all_chats_by_user_id("2")
from apps.webui.internal.db import Session
Session.commit()
with mock_webui_user(id="2"):
response = self.fast_api_client.get(self.create_url("/all/archived"))

View File

@@ -110,6 +110,7 @@ class AbstractPostgresTest(AbstractIntegrationTest):
def _check_db_connection(self):
from apps.webui.internal.db import Session
retries = 10
while retries > 0:
try:
@@ -133,6 +134,7 @@ class AbstractPostgresTest(AbstractIntegrationTest):
def teardown_method(self):
from apps.webui.internal.db import Session
# rollback everything not yet committed
Session.commit()