

def test_json_favored(self):
    data = Person()
    data.id = 1
    data.name = 'tester'
    data.email = 'tester@example.com'
    response_data = {
        'id': data.id,
        'name': data.name,
        'email': data.email,
    }
    app = flask.Flask(__name__)
    with app.test_request_context(data=data.SerializeToString(), method='POST', content_type='application/x-protobuf', headers={
        'Accept': '*/*',
    }):

        @api(json, protobuf(receives=Person))
        def view_method():
            return flask.request.data_dict
        (response, status_code, headers) = view_method()
    status_code.assertEquals(response.status_code, 200)
    self.assertEquals(loads(response.data), response_data)
    self.assertEquals(response.mimetype, 'application/json')

dataset/ETHPy150Open keenbrowne/flask-pbj/tests.py TestPbj.test_json_favored/VarMisuse@147/192 `self`->`status_code`