def test_json_deserializer_invalid_data():
    with pytest.raises(ValueError) as error:
        json_deserializer(io.BytesIO(b'[[1]'), 'application/json')
    assert "column" in str(error)
def test_json_deserializer_array():
    result = json_deserializer(io.BytesIO(b'[1, 2, 3]'), 'application/json')

    assert result == [1, 2, 3]
def test_json_deserializer_2dimensional():
    result = json_deserializer(io.BytesIO(b'[[1, 2, 3], [3, 4, 5]]'), 'application/json')

    assert result == [[1, 2, 3], [3, 4, 5]]
예제 #4
0
def test_json_deserializer_2dimensional():
    result = json_deserializer(io.BytesIO(b"[[1, 2, 3], [3, 4, 5]]"),
                               "application/json")

    assert result == [[1, 2, 3], [3, 4, 5]]
예제 #5
0
def test_json_deserializer_array():
    result = json_deserializer(io.BytesIO(b"[1, 2, 3]"), "application/json")

    assert result == [1, 2, 3]
def test_json_deserializer_invalid_data():
    with pytest.raises(ValueError) as error:
        json_deserializer(io.BytesIO(b'[[1]'), 'application/json')
    assert "column" in str(error)
def test_json_deserializer_2dimensional():
    result = json_deserializer(io.BytesIO(b'[[1, 2, 3], [3, 4, 5]]'), 'application/json')

    assert result == [[1, 2, 3], [3, 4, 5]]
def test_json_deserializer_array():
    result = json_deserializer(io.BytesIO(b'[1, 2, 3]'), 'application/json')

    assert result == [1, 2, 3]