@patch('builtins.super')
    def test_as_view(self, mock_super):
        mock_super().as_view.return_value = 'super_view'
        with patch('openslides.utils.views.ensure_csrf_cookie') as ensure_csrf_cookie:
            views.CSRFMixin.as_view()

        ensure_csrf_cookie.assert_called_once_with('super_view')
Tests, that ensure_csrf_cookie is called.
dataset/ETHPy150Open OpenSlides/OpenSlides/tests/unit/utils/test_views.py/TestCSRFMixin.test_as_view