test_1813177_rbi_org_in.py (726B)
1 import pytest 2 3 MOBILE_ORIGIN = "https://m.rbi.org.in" 4 REDIRECT_DESKTOP_ORIGIN = "https://rbi.org.in" 5 6 7 def get_origin(client): 8 return client.session.execute_script( 9 """ 10 return location.origin; 11 """ 12 ) 13 14 15 @pytest.mark.only_platforms("android") 16 @pytest.mark.asyncio 17 @pytest.mark.with_interventions 18 async def test_enabled(client): 19 await client.navigate(MOBILE_ORIGIN, wait="complete", timeout=20) 20 assert get_origin(client) == MOBILE_ORIGIN 21 22 23 @pytest.mark.only_platforms("android") 24 @pytest.mark.asyncio 25 @pytest.mark.without_interventions 26 async def test_disabled(client): 27 await client.navigate(MOBILE_ORIGIN, wait="complete", timeout=20) 28 assert get_origin(client) == REDIRECT_DESKTOP_ORIGIN