Spaces:
Paused
Paused
Download tests/test_integration_settings.py from BPEL/otree-server: direct link, hf CLI and curl.
- Browser
- Download file 839 Bytes
-
https://huggingface.co/spaces/BPEL/otree-server/resolve/main/tests/test_integration_settings.py
- Command line
-
hf download hf://spaces/BPEL/otree-server/tests/test_integration_settings.py
-
curl -L -o test_integration_settings.py https://huggingface.co/spaces/BPEL/otree-server/resolve/main/tests/test_integration_settings.py
839 Bytes
| from importlib.machinery import SourceFileLoader | |
| from pathlib import Path | |
| PROJECT_DIR = Path(__file__).resolve().parents[1] | |
| SETTINGS_PATH = PROJECT_DIR / 'settings.py' | |
| def load_settings(): | |
| mod = SourceFileLoader('ibe_pp_settings', str(SETTINGS_PATH)).load_module() | |
| return mod | |
| def test_session_configs_present_and_paths_exist(): | |
| settings = load_settings() | |
| cfgs = {c['name']: c for c in settings.SESSION_CONFIGS} | |
| for name in ['classic_baseline', 'policy_nudges', 'guessing_game_demo', 'survey_biases_full']: | |
| assert name in cfgs | |
| # Check app folders exist for policy_nudges sequence | |
| apps = cfgs['policy_nudges']['app_sequence'] | |
| for app in apps: | |
| if app in ('payment_info',): | |
| continue | |
| path = PROJECT_DIR / app | |
| assert path.exists(), f"App folder missing: {path}" | |