Skip to content

Handle Head Requests - #60

Merged
seanboyce merged 5 commits into
seanboyce:devfrom
singhgarima:dev
Apr 19, 2026
Merged

Handle Head Requests#60
seanboyce merged 5 commits into
seanboyce:devfrom
singhgarima:dev

Conversation

@singhgarima

@singhgarima singhgarima commented Apr 17, 2026

Copy link
Copy Markdown
Contributor

Issue: #55

Summary

This PR fixes 405 HTTP Status code for HEAD requests and adds unit testing framework

Key Changes

  • Handle HEAD Requests

    • Added a middleware which checks for HEAD requests and responds
  • Testing Infrastructure

    • Added GitHub Actions workflow for automated testing on PRs to dev branch
    • Created pytest.ini configuration and test dependencies (requirements-test.txt)
    • Established tests/ directory structure with helpers and fixtures
    • Added conftest.py for test environment setup (disables Redis for testing)
  • Reusable Test Utilities

    • create_test_user(): Context manager for creating and cleaning up test users
    • access_token_cookie(): Helper for managing authentication tokens in tests
  • Documentation

    • Added CONTRIBUTING.md with local development setup instructions and testing instructions
  • Code Quality Improvements

    • Fixed deprecated datetime.utcnow()datetime.now(dt.timezone.utc) in token creation
    • Cleaned up imports and formatting in dependencies.py, auth.py, and admin.py

Testing

All code changes are covered by the new test suite that runs on pull requests.

@seanboyce

Copy link
Copy Markdown
Owner

I'll try to review this weekend.

@seanboyce

Copy link
Copy Markdown
Owner

Looks fine to me, I'll install locally and check a couple of things now.

@seanboyce
seanboyce merged commit 886f40d into seanboyce:dev Apr 19, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants