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