Download api/tests/integration_tests/controllers/app_fixture.py from Underground-Digital/Workflow-Engine: direct link, hf CLI and curl.
- Browser
- Download file 491 Bytes
-
https://huggingface.co/spaces/Underground-Digital/Workflow-Engine/resolve/main/api/tests/integration_tests/controllers/app_fixture.py
- Command line
-
hf download hf://spaces/Underground-Digital/Workflow-Engine/api/tests/integration_tests/controllers/app_fixture.py
-
curl -L -o app_fixture.py https://huggingface.co/spaces/Underground-Digital/Workflow-Engine/resolve/main/api/tests/integration_tests/controllers/app_fixture.py
491 Bytes
| import pytest | |
| from app_factory import create_app | |
| from configs import dify_config | |
| 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", | |
| }, | |
| ) | |
| def app(): | |
| app = create_app() | |
| dify_config.LOGIN_DISABLED = True | |
| return app | |