def replace_json_fields(body):
    try:
        response_dict = simplejson.loads(body)
    except:
        return body

    if 'screenname' not in response_dict:
        return body
    if response_dict['screenname'] is not None:
        response_dict['screenname'] = TESTING_USERNAME
    response_dict['userid'] = 1
    response_dict['thumbnail'] = ''
    return simplejson.dumps(response_dict)
dataset/ETHPy150Open IvanMalison/okcupyd/okcupyd_testing/util.py/replace_json_fields/original