test: recordable mocks use json only (#1443)

# Summary:
removes the use of pickle

# Test Plan:
Run the following with `--record-responses` first, then another time
without.

LLAMA_STACK_CONFIG=fireworks pytest -s -v
tests/integration/agents/test_agents.py --safety-shield
meta-llama/Llama-Guard-3-8B --text-model
meta-llama/Llama-3.1-8B-Instruct
This commit is contained in:
ehhuang 2025-03-06 14:46:29 -08:00 committed by GitHub
parent 564977c646
commit 3d71e5a036
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 23792 additions and 26435 deletions

View file

@ -59,7 +59,7 @@ def llama_stack_client_with_mocked_inference(llama_stack_client, request):
return llama_stack_client
record_responses = request.config.getoption("--record-responses")
cache_dir = Path(__file__).parent / "fixtures" / "recorded_responses"
cache_dir = Path(__file__).parent / "recorded_responses"
# Create a shallow copy of the client to avoid modifying the original
client = copy.copy(llama_stack_client)