"""Cookieless Opt-out-Erkennung im banner_text_checker. Sehr untypischer Sonderfall: cookie-FREIE Analyse mit reinem Opt-out-Hinweis statt Consent-Banner (z.B. bayshore.ai). Standard-Opt-in-Checks duerfen dann NICHT feuern (sonst False Positives). """ from services.banner_text_checker import is_cookieless_optout def test_bayshore_cookieless_optout_detected(): # Realer bayshore.ai-Bannertext (Opt-out fuer cookie-freie Analyse). bay = ("privacy-friendly, cookie-free analytics are currently enabled. " "you can change your choice at any time. disable") assert is_cookieless_optout(bay) is True def test_standard_consent_banner_not_cookieless(): assert not is_cookieless_optout( "wir nutzen cookies. alle akzeptieren ablehnen einstellungen") def test_cookiefree_but_with_accept_is_not_optout(): # 'cookie-free' genannt, aber echtes Consent ('accept all') → kein reiner Opt-out. assert not is_cookieless_optout("cookie-free analytics. accept all disable") def test_signal_without_optout_word_is_not_detected(): # cookie-free, aber kein Opt-out-Mechanismus im Text. assert not is_cookieless_optout("cookie-free analytics enabled") def test_empty(): assert not is_cookieless_optout("")