Testing
lowFAT includes automated tests, fixture-based manual testing, and supporting development tools to help contributors verify changes before merging them into dev.
Automated Testing
Automated testing and linting are handled using Tox.
Running:
tox
will run the environments configured in tox.ini.
The current Tox configuration includes:
lint, which runsflake8 lowfat- Django test environments for Django 4.0, 4.1, and 4.2
- coverage reporting for the Django test suite
lowFAT also uses GitHub Actions to run automated checks against commits and pull requests submitted to the repository.
Manual Testing
For manual testing, lowFAT includes fixture data that can be loaded into a local development database.
To load the demo testing data:
python3 manage.py loaddata lowfat/fixtures/demo.json
Then start the local development server:
python3 manage.py runserver
Test Users
The demo fixture includes several example users that can be used during development and manual testing.
| Year | Username | Password | Example role |
|---|---|---|---|
| N/A | admin | 123admin456 | administrative user |
| 2014 | tanisha | 123tan456 | fellow |
| 2015 | orlando | 123orlan456 | fellow |
| 2015 | sharon | 123sharon456 | fellow |
| 2016 | ali | 123ali456 | fellow |
| 2016 | maya | 123maya456 | fellow |
| 2016 | rooney | 123rooney456 | shortlisted applicant |
These users are intended for local development and testing only.
Avatars are from People vector created by Freepik.
Emails
lowFAT automates several email-related tasks, including workflow notifications to fellows, staff, and finance contacts.
During local development we use Django’s text-based email debugger. Any emails generated by the local test server will appear in:
tmp/emails/*.log
Depending on the configuration, it may be necessary to enable email notifications through the Django admin runtime configuration panel:
http://127.0.0.1:8000/admin/constance/config/
In particular:
CLAIMANT_EMAIL_NOTIFICATIONSTAFF_EMAIL_NOTIFICATION
Some finance-related notifications are controlled through project settings, such as:
FUND_FINANCE_EMAILFUND_FINANCE_EMAIL_CC
When testing funding request changes, check the generated email logs if the change affects submission, review, payment, or finance-notification behaviour.
Updating Fixture Data
Occasionally it may be necessary to update the testing fixtures, for example when:
- adding new test users,
- updating example workflows,
- testing new fields,
- or reflecting changes to the data model.
To export fixture data:
python3 manage.py dumpdata \
-e sessions \
-e admin \
-e contenttypes \
-e auth.Permission \
-e lowfat.historicalclaimant \
-e lowfat.historicalfund \
-e lowfat.historicalexpense \
-e lowfat.historicalblog \
--indent 4 auth lowfat > fixtures/demo.json
Review fixture changes carefully before committing them.
Additional Testing Scripts
Some development tasks may also use standalone scripts or ad hoc local checks, particularly when testing migrations, data changes, status workflows, or model updates.
These scripts are typically used during development and maintenance work and may evolve over time.
Before merging milestone branches into dev, contributors should run the relevant automated and manual tests locally where possible.