We need a much better testing infrastructure on localhost. This is something we have never had but would likely reduce number of bugs that get on to -test or production. Claude Code CLI previously wrote this:
I want to build out test infrastructure for this Django project. Current state: 49 SimpleTestCase tests with MagicMock, no DB. We've shipped several fixes (per codebase-analysis.md) that lacked automated coverage because they needed DB-touching tests — query-count regressions for the prefetch_related perf wins, view-level tests for the null-author guards, the delete_unused_files guards, and the member.py field reference fix. Read codebase-analysis.md, the memory files in ~/.claude/projects/-Users-jonfroehlich-Git-makeabilitylabwebsite/memory/, and the existing website/tests.py first.
Goals: (1) a clean base TestCase class with fixture helpers for Person / Publication / Project (handle Person.save()'s Star Wars image side-effects via mocking), (2) at least one assertNumQueries-style perf regression test pinning the /publications/ prefetch_related (so we'd catch it if anyone removed it), (3) backfill the missing view-level tests for the null-author guards in views/news_item.py and news_listing.html. Pa11y CI exists for accessibility — we don't need to touch that.
We need a much better testing infrastructure on localhost. This is something we have never had but would likely reduce number of bugs that get on to -test or production. Claude Code CLI previously wrote this: