def _env(**kwargs):
    """Return a stub WSGI environment."""
    return dict({'wsgi.url_scheme': 'http',
                 'SERVER_NAME': 'localhost',
                 'SERVER_PORT': 80,
                 'SERVER_PROTOCOL': 'HTTP/1.1',
                 'REQUEST_METHOD': 'GET',
                 'PATH_INFO': '/'
                 }, **kwargs)