

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

        @api(json)
        def view_method():
            with self.assertRaises(BadRequest):
                flask.request.data_dict['b']

dataset/ETHPy150Open keenbrowne/flask-pbj/tests.py TestJson.test_missing_data/VarMisuse@31/37 `app`->`self`