app_fixture.py 461 B

123456789101112131415161718192021222324
  1. import pytest
  2. from app_factory import create_app
  3. mock_user = type(
  4. "MockUser",
  5. (object,),
  6. {
  7. "is_authenticated": True,
  8. "id": "123",
  9. "is_editor": True,
  10. "is_dataset_editor": True,
  11. "status": "active",
  12. "get_id": "123",
  13. "current_tenant_id": "9d2074fc-6f86-45a9-b09d-6ecc63b9056b",
  14. },
  15. )
  16. @pytest.fixture
  17. def app():
  18. app = create_app()
  19. app.config["LOGIN_DISABLED"] = True
  20. return app