tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

test_1933811_indices_circana_com.py (934B)


      1 import asyncio
      2 
      3 import pytest
      4 
      5 URL = "https://indices.circana.com"
      6 OLD_URL = "https://indices.iriworldwide.com"
      7 BAD_CSS = ".hiddPage"
      8 
      9 
     10 async def does_unsupported_banner_appear(client, url):
     11    await client.navigate(url, wait="complete")
     12    await asyncio.sleep(2)
     13    return client.find_css(BAD_CSS)
     14 
     15 
     16 @pytest.mark.asyncio
     17 @pytest.mark.with_interventions
     18 async def test_enabled(client):
     19    assert not await does_unsupported_banner_appear(client, URL)
     20 
     21 
     22 @pytest.mark.asyncio
     23 @pytest.mark.with_interventions
     24 async def test_enabled_old_url(client):
     25    assert not await does_unsupported_banner_appear(client, OLD_URL)
     26 
     27 
     28 @pytest.mark.asyncio
     29 @pytest.mark.without_interventions
     30 async def test_disabled(client):
     31    assert await does_unsupported_banner_appear(client, URL)
     32 
     33 
     34 @pytest.mark.asyncio
     35 @pytest.mark.without_interventions
     36 async def test_disabled_old_url(client):
     37    assert await does_unsupported_banner_appear(client, OLD_URL)