def METHOD_NAME(username=None):
    from c2cgeoportal_commons.models import DBSession
    from c2cgeoportal_commons.models.static import User
    request = create_dummy_request()
    request.user = None if username is None else DBSession.query(User).filter_by(username=username).one()
    request.params.update({"ogcserver": "__test_ogc_server"})
    return request