I wrote a function in python that will receive a flask.request. I am wondering how can I test this function by sending a fake request to it. Is there a way to do this locally ?
My function:
def main(request: flask.Request):
    if request.method == 'GET':
        try:
            request_json = request.get_json()
        except:
            return '', 400
        else:
            stuff = do_stuff(request_json)
            return stuff, 200