CustomSerializer#
- class langchain_tests.conftest.CustomSerializer[source]#
Custom serializer for VCR cassettes using YAML and gzip.
Weβre using a custom serializer to avoid the default yaml serializer used by VCR, which is not designed to be safe for untrusted input.
This step is an extra precaution necessary because the cassette files are in compressed YAML format, which makes it more difficult to inspect their contents during development or debugging.
Methods
deserialize
(data)Decompress data and convert it from YAML.
serialize
(cassette_dict)Convert cassette to YAML and compress it.