def METHOD_NAME(self):
    request = self.request_factory.get(
        '/somewhere',
        HTTP_X_FORWARDED_FOR='4.0.0.0',
    )
    request.user = self.anonymous_user
    self.session_middleware.process_request(request)
    request.session['country_code'] = 'CN'
    request.session['ip_address'] = '117.79.83.1'
    self.country_middleware.process_request(request)
    # Country code is changed.
    assert 'SD' == request.session.get('country_code')
    assert '4.0.0.0' == request.session.get('ip_address')