Skip to main content

Testing

Test suite​

pip install -r requirements-dev.txt
pytest

The suite is centered on access control. It exercises every dashboard write route as each of the three roles, account seeding from the environment, the demo account's protections, secret redaction by role, and the audit trail. Key files are tests/test_access_control.py and tests/test_roles.py.

Sample data​

Generate fake leads with +1555 phone numbers for demos and local development:

python -m matilda.seed # add sample leads
python -m matilda.seed --reset # clear existing sample leads first
python -m matilda.seed --seed 42 # reproducible set

Seeded leads show up on the Leads page and in the Overview chart like real ones. Only enable the demo account on an instance running seeded data, because a Viewer sees every lead.

Resetting a lead​

python scripts/reset_lead.py

Clears a single contact's captured fields so you can re-run intake.