This commit is contained in:
Timothy Jaeryang Baek
2024-12-10 00:54:13 -08:00
parent f6bec8d9f3
commit d3d161f723
112 changed files with 1217 additions and 1165 deletions

View File

@@ -115,7 +115,7 @@ class AbstractPostgresTest(AbstractIntegrationTest):
pytest.fail(f"Could not setup test environment: {ex}")
def _check_db_connection(self):
from open_webui.apps.webui.internal.db import Session
from open_webui.internal.db import Session
retries = 10
while retries > 0:
@@ -139,7 +139,7 @@ class AbstractPostgresTest(AbstractIntegrationTest):
cls.docker_client.containers.get(cls.DOCKER_CONTAINER_NAME).remove(force=True)
def teardown_method(self):
from open_webui.apps.webui.internal.db import Session
from open_webui.internal.db import Session
# rollback everything not yet committed
Session.commit()

View File

@@ -5,7 +5,7 @@ from fastapi import FastAPI
@contextmanager
def mock_webui_user(**kwargs):
from open_webui.apps.webui.main import app
from backend.open_webui.routers.webui import app
with mock_user(app, **kwargs):
yield
@@ -19,7 +19,7 @@ def mock_user(app: FastAPI, **kwargs):
get_admin_user,
get_current_user_by_api_key,
)
from open_webui.apps.webui.models.users import User
from open_webui.models.users import User
def create_user():
user_parameters = {