test_1717806_adsafeprotected.py (1285B)
1 import pytest 2 3 from .common import verify_redirectors 4 5 URLS = { 6 "https://x.adsafeprotected.com/x.gif?1": "image", 7 "https://x.adsafeprotected.com/x.png?1": "image", 8 "https://x.adsafeprotected.com/x/x": "image", 9 "https://x.adsafeprotected.com/img": "image", 10 "https://x.adsafeprotected.com/x.js?1": "js", 11 "https://x.adsafeprotected.com/x/adj?1": "js", 12 "https://x.adsafeprotected.com/x/imp/1": "js", 13 "https://x.adsafeprotected.com/x/Serving/1": "js", 14 "https://x.adsafeprotected.com/x/unit/1": "js", 15 "https://x.adsafeprotected.com/jload": "js", 16 "https://x.adsafeprotected.com/jload?1": "js", 17 "https://x.adsafeprotected.com/jsvid": "js", 18 "https://x.adsafeprotected.com/jsvid?1": "js", 19 "https://x.adsafeprotected.com/mon?1": "js", 20 "https://x.adsafeprotected.com/tpl": "js", 21 "https://x.adsafeprotected.com/tpl?1": "js", 22 "https://x.adsafeprotected.com/services/pub?1": "js", 23 } 24 25 26 @pytest.mark.asyncio 27 @pytest.mark.with_strict_etp 28 @pytest.mark.with_shims 29 async def test_works_with_shims(client): 30 await verify_redirectors(client, URLS, "REDIRECTED") 31 32 33 @pytest.mark.asyncio 34 @pytest.mark.with_strict_etp 35 @pytest.mark.without_shims 36 async def test_works_without_etp(client): 37 await verify_redirectors(client, URLS, "BLOCKED")