Esempio n. 1
0
def test_pretty_json():
    assert cv.pretty_json(b'{"foo": 1}')
    assert not cv.pretty_json(b"moo")
    assert cv.pretty_json(b'{"foo" : "\xe4\xb8\x96\xe7\x95\x8c"}')  # utf8 with chinese characters
    assert not cv.pretty_json(b'{"foo" : "\xFF"}')
Esempio n. 2
0
def test_pretty_json():
    assert cv.pretty_json(b'{"foo": 1}')
    assert not cv.pretty_json(b"moo")
    assert cv.pretty_json(b'{"foo" : "\xe4\xb8\x96\xe7\x95\x8c"}')  # utf8 with chinese characters
    assert not cv.pretty_json(b'{"foo" : "\xFF"}')