def test_process_request_no_permission(self):
        self.assertFalse(self.user.has_perm('accounts.can_impersonate'))
        middleware = ImpersonationMiddleware()
        request = self.request_factory.get('/')
        request.session = {'impersonate_id': self.admin.pk}
        request.user = self.user
        middleware.process_request(request)
        self.assertEqual(request.user, self.user)
Get a date list by calling `queryset.dates()`, checking along the way
dataset/ETHPy150Open ofa/connect/open_connect/middleware/tests/test_impersonation.py/ImpersonationMiddlewareTest.test_process_request_no_permission--crossover with--dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.5/django/views/generic/dates.py/BaseDateListView.get_date_list