Beispiel #1
0
def test_stream_deserializer():
    stream, content_type = StreamDeserializer()(io.BytesIO(b"[1, 2, 3]"),
                                                "application/json")
    result = stream.read()
    assert result == b"[1, 2, 3]"
    assert content_type == "application/json"
def test_stream_deserializer():
    stream, content_type = StreamDeserializer()(io.BytesIO(b'[1, 2, 3]'), 'application/json')
    result = stream.read()
    assert result == b'[1, 2, 3]'
    assert content_type == 'application/json'
def test_stream_deserializer():
    stream, content_type = StreamDeserializer()(io.BytesIO(b'[1, 2, 3]'), 'application/json')
    result = stream.read()
    assert result == b'[1, 2, 3]'
    assert content_type == 'application/json'