@@ -13,7 +13,12 @@ async def test_available_async(anc):
1313
1414
1515def test_get_set_location (nc_any ):
16- nc_any .weather_status .set_location (longitude = 0.0 , latitude = 0.0 )
16+ try :
17+ nc_any .weather_status .set_location (longitude = 0.0 , latitude = 0.0 )
18+ except NextcloudException as e :
19+ if e .status_code in (408 , 500 , 996 ):
20+ pytest .skip ("Some network problem on the host" )
21+ raise e from None
1722 loc = nc_any .weather_status .get_location ()
1823 assert loc .latitude == 0.0
1924 assert loc .longitude == 0.0
@@ -42,7 +47,12 @@ def test_get_set_location(nc_any):
4247
4348@pytest .mark .asyncio (scope = "session" )
4449async def test_get_set_location_async (anc_any ):
45- await anc_any .weather_status .set_location (longitude = 0.0 , latitude = 0.0 )
50+ try :
51+ await anc_any .weather_status .set_location (longitude = 0.0 , latitude = 0.0 )
52+ except NextcloudException as e :
53+ if e .status_code in (408 , 500 , 996 ):
54+ pytest .skip ("Some network problem on the host" )
55+ raise e from None
4656 loc = await anc_any .weather_status .get_location ()
4757 assert loc .latitude == 0.0
4858 assert loc .longitude == 0.0
0 commit comments