'Check that the middleware does process the provided request'

def check_enabled(self, request):

    def cb_check_req_is_secure_false(request, callback, args, kwargs):
        "\n                                                Check    that    the    request    doesn't    pass    (yet)    the    `is_secure()`    test\n                                                "
        self.assertFalse(request.is_secure())
        return SENTINEL
    with patch.object(CsrfViewMiddleware, 'process_view') as mock_method:
        mock_method.side_effect = cb_check_req_is_secure_false
        res = self.middleware.process_view(request, None, None, None)
    self.assertIs(res, SENTINEL)
    self.assertTrue(request.is_secure())
