def test_json_valid():
    test = dict(a=5, b='test', c=[1,2,3])
    env = dict(copy.deepcopy(env1))
    env['CONTENT_TYPE'] = 'application/json; charset=UTF-8'
    env['wsgi.input'] = BytesIO(to_bytes(json.dumps(test)))
    env['CONTENT_LENGTH'] = str(len(json.dumps(test)))
    r = Request(env)
    assert r.json == test
Environ: Request.json property.
dataset/ETHPy150Open zeaphoo/cocopot/tests/test_request.py/test_json_valid