

def test_simple_json_request(self):
    data = {
        'a': 1,
    }
    app = flask.Flask(__name__)
    with app.test_request_context(data=dumps(data), method='POST', content_type='application/json', headers={
        'Accept': '*/*',
    }):

        @api(json)
        def view_method():
            self.assertEqual(flask.request.data_dict, data)
            return 200
        view_method()

dataset/ETHPy150Open keenbrowne/flask-pbj/tests.py TestJson.test_simple_json_request/original