fix(tests): convert VCR cassettes to correct format and fix file tests

- Convert 78 cassettes from old VCR format (content/status_code/http_version)
  to new format (body.string/status.code/status.message)
- Replace MagicMock with real File objects in file-related agent tests
This commit is contained in:
Greyson LaLonde
2026-01-23 06:29:28 -05:00
parent 8eea0e45eb
commit f89c39a480
81 changed files with 12996 additions and 7620 deletions

View File

@@ -47,14 +47,17 @@ interactions:
method: POST
uri: https://api.openai.com/v1/chat/completions
response:
content: "{\n \"id\": \"chatcmpl-AB7fr4aPstiFUArxwxTVdfJSFwxsC\",\n \"object\":
\"chat.completion\",\n \"created\": 1727214471,\n \"model\": \"gpt-4o-2024-05-13\",\n
\ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\":
\"assistant\",\n \"content\": \"Thought: I now can give a great answer\\nFinal
Answer: Test output\",\n \"refusal\": null\n },\n \"logprobs\":
null,\n \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\":
155,\n \"completion_tokens\": 15,\n \"total_tokens\": 170,\n \"completion_tokens_details\":
{\n \"reasoning_tokens\": 0\n }\n },\n \"system_fingerprint\": \"fp_52a7f40b0b\"\n}\n"
body:
string: "{\n \"id\": \"chatcmpl-AB7fr4aPstiFUArxwxTVdfJSFwxsC\",\n \"object\"\
: \"chat.completion\",\n \"created\": 1727214471,\n \"model\": \"gpt-4o-2024-05-13\"\
,\n \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \
\ \"role\": \"assistant\",\n \"content\": \"Thought: I now can\
\ give a great answer\\nFinal Answer: Test output\",\n \"refusal\"\
: null\n },\n \"logprobs\": null,\n \"finish_reason\": \"stop\"\
\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 155,\n \"completion_tokens\"\
: 15,\n \"total_tokens\": 170,\n \"completion_tokens_details\": {\n\
\ \"reasoning_tokens\": 0\n }\n },\n \"system_fingerprint\": \"\
fp_52a7f40b0b\"\n}\n"
headers:
CF-Cache-Status:
- DYNAMIC
@@ -96,6 +99,7 @@ interactions:
- 0s
x-request-id:
- req_88b1376917b345c976fdb03a55f7b6c1
http_version: HTTP/1.1
status_code: 200
status:
code: 200
message: OK
version: 1