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