requests icon indicating copy to clipboard operation
requests copied to clipboard

Fix test compatibility on Windows by using direct CA certificate path

Open tboy1337 opened this issue 2 months ago • 0 comments

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.crt with tests/certs/expired/ca/ca.crt in 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.

tboy1337 avatar Oct 22 '25 15:10 tboy1337