def test_write_string_value(): json_serialization_writer = JsonSerializationWriter() json_serialization_writer.write_string_value("displayName", "Adele Vance") stream = json_serialization_writer.get_serialized_content() content = stream.read() content_string = content.decode('utf-8') assert content_string == '{"displayName": "Adele Vance"}'
def test_write_string_value_no_key(): json_serialization_writer = JsonSerializationWriter() value = json_serialization_writer.write_string_value(None, "Adele Vance") assert value == "Adele Vance"