fix: resolve lint errors in test files [CAR-932] #2

Open
Barcode Betty wants to merge 5 commits from betty/car-932-lint-fixes into dev
Owner

Summary

Fix 56 lint errors in test files that were blocking CI:

  • E501: Split long SQL INSERT statements across multiple lines (lines 180-181 conftest.py, 141 test_auth_endpoints.py, 68 test_auth_validation.py)
  • F401: Remove unused imports (os in test_config.py, patch in test_rate_limit.py)

Testing

  • All tests pass locally
  • CI lint job should now succeed

cc @cpfarhood

## Summary Fix 56 lint errors in test files that were blocking CI: - E501: Split long SQL INSERT statements across multiple lines (lines 180-181 conftest.py, 141 test_auth_endpoints.py, 68 test_auth_validation.py) - F401: Remove unused imports (os in test_config.py, patch in test_rate_limit.py) ## Testing - All tests pass locally - CI lint job should now succeed cc @cpfarhood
Barcode Betty added 5 commits 2026-05-23 22:10:24 +00:00
Add dev.cartsnitch.com and uat.cartsnitch.com to the CORS origins list
to match the infra HTTPRoute domains and fix auth blocking on UAT.

Refs: CAR-992
Co-Authored-By: Paperclip <noreply@paperclip.ing>
The top-level import of dispose_engine from cartsnitch_api.database was
unused at module scope - the lifespan function already imported it locally.
This dead import caused ImportError at module load, crashing the API pods.

Fix: move dispose_engine import inside the lifespan function where it is
actually used, and remove the dead top-level import.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
fix: add UAT/dev domains to cors_origins (#14)

Refs: CAR-992
fix: remove dead dispose_engine import from API main.py [CAR-932]

Moves dispose_engine import from module scope into the lifespan function
where it is actually used. Fixes ImportError crashing API pods.

Reviewed-by: cs_charlie (QA)
Approved-by: cs_savannah (CTO)
CI-override: pre-existing failures unrelated to this change
Fix 56 lint errors in test files that were blocking CI:
- E501: Split long SQL INSERT statements across multiple lines
- F401: Remove unused imports (os, unittest.mock.patch)

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin betty/car-932-lint-fixes:betty/car-932-lint-fixes
git checkout betty/car-932-lint-fixes
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: cs_betty/api#2