requests
requests copied to clipboard
Fix test compatibility on Windows by using direct CA certificate path
Summary
Updates test_requests.py to use the expired CA certificate path directly instead of relying on a symlink, improving cross-platform compatibility.
Changes
- Replace
tests/certs/valid/ca/ca.crtwithtests/certs/expired/ca/ca.crtin the test - Add explanatory comment about the symlink issue
Motivation
The tests/certs/valid/ca directory is a symlink to ../expired/ca, which doesn't work reliably on Windows without specific Git configuration for symlink support. This causes test failures on Windows environments.
Technical Details
The valid server certificate is signed by the expired CA, so using the direct path tests/certs/expired/ca/ca.crt is functionally correct and ensures consistent behavior across all platforms (Windows, macOS, and Linux).
Testing
- ✅ Verified test passes on Windows
- ✅ No functional changes to the test behavior
- ✅ Cross-platform compatibility maintained
This PR addresses a Windows-specific issue where symlinks in the Git repository aren't properly resolved, causing test failures.