def METHOD_NAME(self):
    from c2cgeoportal_geoportal.views.mapserverproxy import MapservProxy
    request = self._create_getcap_request()
    request.params.update(dict(service="wfs", version="1.1.1", request="getcapabilities"))
    response = MapservProxy(request).proxy()
    assert "<Name>testpoint_protected</Name>" not in response.body.decode("utf-8")
    # testpoint_group is not public so even unprotected layers are hidden:
    assert "<Name>testpoint_unprotected</Name>" not in response.body.decode("utf-8")
    assert "<Name>testpoint_group</Name>" not in response.body.decode("utf-8")
    request = self._create_getcap_request(username="__test_user1")
    request.params.update(dict(service="wfs", version="1.1.1", request="getcapabilities"))
    response = MapservProxy(request).proxy()
    assert "<Name>testpoint_protected</Name>" in response.body.decode("utf-8")
    assert "<Name>testpoint_unprotected</Name>" in response.body.decode("utf-8")
    assert "<Name>testpoint_group</Name>" not in response.body.decode("utf-8")