@pytest.mark.parametrize(('validator_class', 'params'), [(ReCaptchaV2Validator, {}), (ReCaptchaV3Validator, {'action': 'test_action', 'required_score': 0.4})])
def test_recaptcha_validator_set_context(validator_class, params, settings):
    settings.DRF_RECAPTCHA_TESTING = True
    validator = validator_class(**params)
    assert (validator.recaptcha_client_ip == '')
    serializer_field = mock.Mock(context={'request': mock.Mock(META={'HTTP_X_FORWARDED_FOR': '4.3.2.1'})})
    validator('test_token', serializer_field)
    assert (validator.recaptcha_client_ip == '4.3.2.1')
@pytest.mark.parametrize(('validator_class', 'params'), [(ReCaptchaV2Validator, {}), (ReCaptchaV3Validator, {'action': 'test_action', 'required_score': 0.4})])
def test_recaptcha_validator_set_context(validator_class, params, settings):
    settings.DRF_RECAPTCHA_TESTING = True
    validator = validator_class(**params)
    assert (validator.recaptcha_client_ip == )
    serializer_field = mock.Mock(context={'request': mock.Mock(META={'HTTP_X_FORWARDED_FOR': '4.3.2.1'})})
    validator('test_token', serializer_field)
    assert (validator.recaptcha_client_ip == '4.3.2.1')