keystoneauth1.fixture.serializer module¶
A serializer to emit YAML but with request body in nicely formatted JSON.
- class keystoneauth1.fixture.serializer.YamlJsonSerializer
Bases:
BaseSerializer- __doc__ = None
- __module__ = 'keystoneauth1.fixture.serializer'
- deserialize(cassette_data: str) Any
A method that must be implemented by the Serializer author.
The return value is extremely important. If it is not empty, the dictionary returned must have the following structure:
{ 'http_interactions': [{ # Interaction }, { # Interaction }], 'recorded_with': 'name of recorder' }
- Params str cassette_data:
The data serialized as a string which needs to be deserialized.
- Returns:
dictionary
- name = 'yamljson'
- keystoneauth1.fixture.serializer._is_json_body(interaction: Interaction) bool
- keystoneauth1.fixture.serializer._represent_scalar(self: BaseRepresenter, tag: str, value: str, style: str | None = None) ScalarNode
- keystoneauth1.fixture.serializer._unicode_representer(dumper: Dumper, uni: str) ScalarNode