mirror of
https://github.com/langgenius/dify.git
synced 2025-07-07 09:11:55 +00:00
25 lines
461 B
Python
25 lines
461 B
Python
![]() |
import pytest
|
||
|
|
||
|
from app_factory import create_app
|
||
|
|
||
|
mock_user = type(
|
||
|
"MockUser",
|
||
|
(object,),
|
||
|
{
|
||
|
"is_authenticated": True,
|
||
|
"id": "123",
|
||
|
"is_editor": True,
|
||
|
"is_dataset_editor": True,
|
||
|
"status": "active",
|
||
|
"get_id": "123",
|
||
|
"current_tenant_id": "9d2074fc-6f86-45a9-b09d-6ecc63b9056b",
|
||
|
},
|
||
|
)
|
||
|
|
||
|
|
||
|
@pytest.fixture
|
||
|
def app():
|
||
|
app = create_app()
|
||
|
app.config["LOGIN_DISABLED"] = True
|
||
|
return app
|