'Request attributes, such as .user or .session must not be modified'

def test_request_attributes_retention(self):

    url_name = 'include1:home2'
    data = {self.url_name_arg: url_name}
    request = self.factory.get(AngularUrlMiddleware.ANGULAR_REVERSE, data=data)
    request.user = self.user
    self.middleware.process_request(request)
    self.assertEqual(request.user, self.user)
