Releases
9 releases keptv0.3.3 Release v0.3.3
descoped/fastapi-testingGitHuboranheim
Maintenance & Dependency Release
Release notes
Maintenance & Dependency Release
The library API is unchanged from v0.3.2 —
src/fastapi_testingis byte-identical. This release modernizes dependencies (security fixes + latest compatible versions) and CI tooling.Dependencies
- Security updates:
starlette,pygments, andpytestmoved to patched releases. - Minimums raised to the latest releases that still support Python ≥ 3.11:
- Runtime:
fastapi>=0.137.2,starlette>=1.3.1,uvicorn>=0.49.0,websockets>=16.0 - Dev/build:
pytest>=9.1.0,pytest-asyncio>=1.4.0,pytest-cov>=7.1.0,pydantic>=2.13.4,ruff>=0.15.17,hatchling>=1.30.1
- Runtime:
Note for consumers: installing
fastapi-testing0.3.3 now pulls in the newer FastAPI / Starlette / Uvicorn minimums listed above.CI / Tooling
- GitHub Actions upgraded to current majors:
checkoutv7,setup-pythonv6,setup-uvv8.2.0,codecov-actionv7,attest-build-provenancev4. - Fixed the pinned uv version in CI (
0.5.11→0.11.13) so it can parse the currentrevision = 3lockfile. - "Build and Test" now runs on pull requests.
Compatibility
- Python 3.11–3.13. No public API changes; no migration required.
Full Changelog: https://github.com/descoped/fastapi-testing/compare/v0.3.2...v0.3.3
- Security updates:
v0.3.2 Release v0.3.2
descoped/fastapi-testingGitHuboranheim
New Features
Release notes
New Features
Public Headers API for AsyncTestResponse
The AsyncTestResponse class now provides a public headers property, eliminating the need to access the protected
_responsemember for header retrieval.Before
# Previously required accessing protected member location = response._response.headers.get("location")After
# Clean public API location = response.headers.get("location")Improvements
- Better API Design: Headers are now accessible through a clean, public property interface
- Consistent Error Handling: Attempting to access headers on WebSocket connections raises
InvalidResponseTypeErrorwith a clear message - Case-Insensitive Access: Headers can be accessed case-insensitively through
httpx.Headersinterface
Testing
- Added comprehensive tests for HTTP response header access
- Added tests for redirect responses with Location header
- Added WebSocket error handling tests to ensure proper exceptions are raised
Example Usage
async with create_test_server() as server: @server.app.post("/login") async def login_endpoint(): return Response( status_code=302, headers={"Location": "/dashboard"} ) response = await server.client.post("/login", follow_redirects=False) # Access headers directly assert response.status_code == 302 assert response.headers["Location"] == "/dashboard" # Case-insensitive access location = response.headers.get("location") # Works!Breaking Changes
None - this is a backwards-compatible enhancement.
Full Changelog: https://github.com/descoped/fastapi-testing/compare/v0.3.1...v0.3.2
v0.3.1 Release v0.3.1
descoped/fastapi-testingGitHuboranheim
🚀 FastAPI Testing v0.3.1
Release notes
🚀 FastAPI Testing v0.3.1
Code Quality & Testing Enhancement Release
This release significantly improves code quality, testing coverage, and development experience while maintaining full backward compatibility.
✨ What's New
- Modern Code Formatting: Integrated [Ruff](https://github.com/astral-sh/ruff) as the primary code formatter and linter
- Comprehensive Test Coverage: Added extensive edge case and real-world scenario tests
- Enhanced CI/CD: Improved workflow reliability with better test coverage reporting
- Modern Python Syntax: Updated to Python 3.11+ type annotations throughout the codebase
🧪 Testing Improvements
- Edge Case Coverage: New tests for port exhaustion, invalid ranges, and connection failures
- WebSocket Testing: Enhanced WebSocket tests with type error handling and timeout scenarios
- Server Lifecycle: Comprehensive tests for server startup, shutdown, and error conditions
- Configuration Testing: Full coverage of environment variable handling and validation
- Concurrent Operations: Tests for multiple simultaneous connections and requests
🔧 Code Quality Enhancements
- Type Annotations: Modernized to use
list[T]instead ofList[T]syntax - Error Handling: Replaced try/except blocks with
contextlib.suppresswhere appropriate - Import Organization: Consistent import sorting and organization across all files
- Code Formatting: Standardized formatting with Ruff configuration
- Documentation: Updated with project badges and improved README
📦 Development Tools
- Ruff Integration: Comprehensive linter and formatter configuration
- CI Improvements: Enhanced GitHub Actions workflows with better test reporting
- Code Coverage: Improved coverage reporting with Codecov integration
🔄 Migration Notes
This release is fully backward compatible. No changes are required for existing users. The API remains unchanged while the internal code quality has been significantly improved.
🎯 Benefits for Contributors
- Faster Development: Automated code formatting with Ruff
- Better Testing: Comprehensive test suite covering edge cases
- Consistent Style: Enforced code style across the entire codebase
- Modern Practices: Updated to contemporary Python development standards
v0.3.0 Release v0.3.0
descoped/fastapi-testingGitHuboranheim
🚀 FastAPI Testing v0.3.0
Release notes
🚀 FastAPI Testing v0.3.0
Major Tooling Modernization Release
This release brings significant improvements to the development workflow and build system while maintaining full backward compatibility.
✨ What's New
- Modern Package Management: Migrated from Poetry to [uv](https://github.com/astral-sh/uv) for faster dependency resolution and package management
- Automated Releases: Added GitHub Actions workflow for automated releases and publishing
- Enhanced CI/CD: New build and test workflows with coverage reporting via Codecov
- Dependency Automation: Configured Renovate bot for automated dependency updates
🔧 Technical Changes
- Build System: Switched from Poetry to hatchling with PEP 621 compliant
pyproject.toml - Lock Files: Replaced
poetry.lockwithuv.lockfor more efficient dependency resolution - Testing: Added
pytest-covfor comprehensive test coverage reporting - Project Structure: Fixed source folder structure for better package distribution
v0.2.2 Release v0.2.2
descoped/fastapi-testingGitHuboranheim
Configuration simplification:
Release notes
Configuration simplification:
- Removed dependencies: pydantic-settings and python-dotenv
- Replaced with lightweight Config class with explicit env var loading
- Moved pydantic to dev dependencies only
- Improved VS Code configuration settings
v0.2.1 Release v0.2.1
descoped/fastapi-testingGitHuboranheim
(feat) add full WebSocket support and modernize codebase.
Release notes
(feat) add full WebSocket support and modernize codebase.
Add comprehensive WebSocket functionality with protocol-level support and connection management.
Key changes:
- Add WebSocket testing capabilities with robust message handling
- Implement WebSocketConfig and WebSocketHelper classes
- Add retry logic and proper cleanup for WebSocket connections
- Add environment-based configuration via pydantic-settings
v0.2.0 Release v0.2.0
descoped/fastapi-testingGitHuboranheim
(refactor) rename Test-prefixed classes to Async prefix
Release notes
(refactor) rename Test-prefixed classes to Async prefix
Rename classes prefixed with "Test" to "Async" to prevent pytest from treating them as test classes. This fixes pytest collection warnings.
- Rename TestServer to AsyncTestServer
v0.1.1 Release v0.1.1
descoped/fastapi-testingGitHuboranheim
fix: Downgrade httpx dependency for better compatibility
Release notes
fix: Downgrade httpx dependency for better compatibility
- Constrain httpx version to >=0.23.0,<0.28.0 for stability
- Update documentation link to point to master branch
- Remove pytest.ini in favor of pyproject.toml configuration
Breaking changes: None
v0.1.0 Initial Release v0.1.0
descoped/fastapi-testingGitHuboranheim
Initial release of FastAPI Testing framework with async-first design, automatic port management, and clean lifecycle management.
Release notes
Initial release of FastAPI Testing framework with async-first design, automatic port management, and clean lifecycle management.
Includes TestServer, TestClient, and TestResponse components with full FastAPI lifespan support.
Requires Python 3.11+, FastAPI 0.115.0+
Key features:
- Async-first test framework
- Automatic port management
- Context manager support
- Built-in async HTTP client
- Resource cleanup
- Type-safe design