# Test Fixes Required - 2024-02-22 ## Issues Identified ### 1. ParkArea Unique Constraint Test (IntegrityError) - **Problem**: Test expects ValidationError but gets IntegrityError - **Root Cause**: Database constraint violation instead of model validation - **Fix**: Update test to expect IntegrityError or add model validation ### 2. Numeric Filtering Test (min_rides filter) - **Problem**: Filter not working correctly for min_rides=18 - **Root Cause**: Likely issue with ride count calculation or filter logic - **Fix**: Check ParkFilter implementation and ride count logic ### 3. Historical Slug Lookup Test (is_historical flag) - **Problem**: is_historical returning False instead of True for old slug - **Root Cause**: get_by_slug method not correctly identifying historical slugs - **Fix**: Review ParkArea.get_by_slug implementation ## Priority Order 1. Fix unique constraint test (quick fix) 2. Fix historical slug lookup (core functionality) 3. Fix numeric filtering (search feature) ## Next Steps - Fix tests one by one - Run test suite after each fix - Document any model changes needed