mirror of
https://github.com/hwchase17/langchain.git
synced 2026-06-09 10:17:00 +00:00
chore(openai): fix broken vcr cassette playback and add ci guard (#36502)
Fix broken VCR cassette playback in `langchain-openai` integration tests and add a CI job to prevent regressions. Two independent bugs made all VCR-backed tests fail: `before_record_request` redacts URIs to `**REDACTED**` but `match_on` still included `uri` (so playback never matched), and a typo-fix commit (`c9f51aef85`) changed test input strings without re-recording cassettes (so `json_body` matching also failed).
This commit is contained in:
@@ -27,6 +27,11 @@ test tests:
|
||||
integration_test integration_tests:
|
||||
uv run --group test --group test_integration pytest -n auto $(TEST_FILE)
|
||||
|
||||
# Run VCR cassette-backed integration tests in playback-only mode (no API keys needed).
|
||||
# Catches stale cassettes caused by test input changes without re-recording.
|
||||
test_vcr:
|
||||
uv run --group test pytest --record-mode=none -m vcr --ignore=tests/integration_tests/chat_models/test_azure_standard.py tests/integration_tests/
|
||||
|
||||
test_watch:
|
||||
uv run --group test ptw --snapshot-update --now . -- -vv $(TEST_FILE)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user