# Demo Test Suite

Automated tests for the investor demo configuration.

## Prerequisites

1. Gateway DB must be running and accessible
2. Demo config must be loaded first: Admin UI → `/admin/demo-config` → Load "Investor Demo April 2026"
3. RMA credentials must be set in `gateway/config.ini`

## Run

```bash
cd gateway/

# All demo tests (structural, no AI calls):
pytest tests/demo/ -v

# Only bootstrap tests:
pytest tests/demo/test_demo_bootstrap.py -v

# Only UC1 trustee:
pytest tests/demo/test_demo_uc1_trustee.py -v
```

## Test files

| File | What it tests |
|------|--------------|
| `test_demo_bootstrap.py` | Idempotent load/remove, mandates, user, features, RMA, neutralization |
| `test_demo_uc1_trustee.py` | Trustee instances, RMA config, system workflow templates |
| `test_demo_uc2_realestate.py` | Workspace instances for agent demo |
| `test_demo_uc3_chatbot.py` | Chatbot instance, knowledge-base files |
| `test_demo_uc4_i18n.py` | i18n readiness, Spanish not pre-installed |
| `test_demo_neutralization.py` | Neutralization config enabled, test PDF exists |
