def test_get_and_post_form(
    client, url, params, del_params=[], post_url=None):
    post_url = post_url or url
    resp = client.get(url)
    logger.debug("Response received using get: \n%s" % resp)
    if resp.status_code != 405 and resp.status_code != 302:
        form_params = parse_form(resp.content)
        logger.debug("Form params received: \n%s" % pformat(form_params))
        form_params.update(params)
    else:
        form_params = params
    for k in del_params:
        if k in form_params:
            del form_params[k]
    for k, v in form_params.items():
        if v == None:
            del form_params[k]
    resp = client.post(post_url, form_params)
    logger.debug("Posting back using params \n%s" % pformat(form_params))
    logger.debug("Response after post:\n%s" % resp)
    return resp
Get the form at C{url}, modify named parameters by those in C{params},
dataset/ETHPy150Open fp7-ofelia/ocf/expedient/src/python/expedient/common/tests/client.py/test_get_and_post_form