mirror of
https://github.com/open-webui/open-webui
synced 2025-06-26 18:26:48 +00:00
feat(sqlalchemy): format backend
This commit is contained in:
@@ -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"))
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user