def METHOD_NAME():
    fake_config_path = "fake_config_path"
    fake_status = "fake_status"
    fake_response = "fake_response"
    fake_content_type = "fake_content_type"
    fake_compression_level = 5
    fake_compressed_contents = "fake compressed contents"
    fake_compression_headers = {"phony": "dummy"}
    request_env = {"HTTP_ACCEPT_ENCODING": "gzip"}
    setup_testing_defaults(request_env)
    mock_start_response = mock.MagicMock()
    with mock.patch("pycsw.wsgi.server", autospec=True) as mock_server, \
            mock.patch.object(
                wsgi, "get_configuration_path") as mock_get_config_path, \
            mock.patch.object(wsgi, "compress_response") as mock_compress:
        mock_compress.return_value = (fake_compressed_contents,
                                      fake_compression_headers)
        mock_get_config_path.return_value = fake_config_path
        mock_csw_class = mock_server.Csw
        mock_pycsw = mock_csw_class.return_value
        mock_pycsw.config = mock.MagicMock()
        mock_pycsw.config.get.return_value = fake_compression_level
        mock_pycsw.dispatch_wsgi.return_value = (fake_status, fake_response)
        mock_pycsw.contenttype = fake_content_type
        wsgi.application(request_env, mock_start_response)
        mock_pycsw.config.get.assert_called_with("server",
                                                 "gzip_compresslevel")
        mock_compress.assert_called_with(fake_response, fake_compression_level)