def METHOD_NAME(self):
    request = self.request_factory.get('/courses/')
    remote_addr = '127.0.0.1'
    forwarded_ip = '11.22.33.44'
    request.META['REMOTE_ADDR'] = remote_addr
    request.META['HTTP_X_FORWARDED_FOR'] = forwarded_ip
    context = self.get_context_for_request(request)
    assert context['ip'] == forwarded_ip