Ejemplo n.º 1
0
def test_recaptcha_disabled():
    recaptcha = ReCaptcha(site_key="SITE_KEY",
                          secret_key="SECRET_KEY",
                          is_enabled=False)
    assert recaptcha.is_enabled == False
    assert recaptcha.get_code() == ""
    assert recaptcha.verify(response="None", remote_ip="0.0.0.0") == True
def test_recaptcha_disabled_flask():
    app.config.update({
        "RECAPTCHA_ENABLED": False
    })
    recaptcha = ReCaptcha(app=app)
    assert recaptcha.is_enabled == False
    assert recaptcha.get_code() == ""
    assert recaptcha.verify(response="None", remote_ip="0.0.0.0") == True
Ejemplo n.º 3
0
def test_recaptcha_disabled_flask():
    app.config.update({"RECAPTCHA_ENABLED": False})
    recaptcha = ReCaptcha(app=app)
    assert recaptcha.is_enabled == False
    assert recaptcha.get_code() == ""
    assert recaptcha.verify(response="None", remote_ip="0.0.0.0") == True
Ejemplo n.º 4
0
def test_recaptcha_enabled_flask():
    recaptcha = ReCaptcha(app=app)
    assert isinstance(recaptcha, ReCaptcha)
    assert recaptcha.is_enabled == True
    assert "script" in recaptcha.get_code()
    assert recaptcha.verify(response="None", remote_ip="0.0.0.0") == False
Ejemplo n.º 5
0
def test_recaptcha_enabled():
    recaptcha = ReCaptcha(site_key="SITE_KEY", secret_key="SECRET_KEY")
    assert isinstance(recaptcha, ReCaptcha)
    assert recaptcha.is_enabled == True
    assert "script" in recaptcha.get_code()
    assert recaptcha.verify(response="None", remote_ip="0.0.0.0") == False
def test_recaptcha_disabled():
    recaptcha = ReCaptcha(site_key="SITE_KEY", secret_key="SECRET_KEY", is_enabled=False)
    assert recaptcha.is_enabled == False
    assert recaptcha.get_code() == ""
    assert recaptcha.verify(response="None", remote_ip="0.0.0.0") == True
def test_recaptcha_enabled_flask():
    recaptcha = ReCaptcha(app=app)
    assert isinstance(recaptcha, ReCaptcha)
    assert recaptcha.is_enabled == True
    assert "script" in recaptcha.get_code()
    assert recaptcha.verify(response="None", remote_ip="0.0.0.0") == False
def test_recaptcha_enabled():
    recaptcha = ReCaptcha(site_key="SITE_KEY", secret_key="SECRET_KEY")
    assert isinstance(recaptcha, ReCaptcha)
    assert recaptcha.is_enabled == True
    assert "script" in recaptcha.get_code()
    assert recaptcha.verify(response="None", remote_ip="0.0.0.0") == False