@@ -28,30 +28,30 @@ def mock_production_taskcluster_root_url(monkeypatch):
2828
2929@pytest .fixture
3030def root_url (mock_environ ):
31- tc .get_root_url .clear ()
31+ tc .get_root_url .cache_clear ()
3232 return tc .get_root_url (False )
3333
3434
3535@pytest .fixture
3636def proxy_root_url (monkeypatch , mock_environ ):
3737 monkeypatch .setenv ("TASK_ID" , "123" )
3838 monkeypatch .setenv ("TASKCLUSTER_PROXY_URL" , "https://taskcluster-proxy.net" )
39- tc .get_root_url .clear ()
39+ tc .get_root_url .cache_clear ()
4040 return tc .get_root_url (True )
4141
4242
4343def test_get_root_url (monkeypatch ):
44- tc .get_root_url .clear ()
44+ tc .get_root_url .cache_clear ()
4545 assert tc .get_root_url (False ) == tc .PRODUCTION_TASKCLUSTER_ROOT_URL
4646
4747 custom_url = "https://taskcluster-root.net"
4848 monkeypatch .setenv ("TASKCLUSTER_ROOT_URL" , custom_url )
49- tc .get_root_url .clear ()
49+ tc .get_root_url .cache_clear ()
5050 assert tc .get_root_url (False ) == custom_url
5151
5252 # trailing slash is normalized
5353 monkeypatch .setenv ("TASKCLUSTER_ROOT_URL" , custom_url + "/" )
54- tc .get_root_url .clear ()
54+ tc .get_root_url .cache_clear ()
5555 assert tc .get_root_url (False ) == custom_url
5656
5757 with pytest .raises (RuntimeError ):
@@ -66,7 +66,7 @@ def test_get_root_url(monkeypatch):
6666 proxy_url = "https://taskcluster-proxy.net"
6767 monkeypatch .setenv ("TASKCLUSTER_PROXY_URL" , proxy_url )
6868 assert tc .get_root_url (True ) == proxy_url
69- tc .get_root_url .clear ()
69+ tc .get_root_url .cache_clear ()
7070
7171 # no default set
7272 monkeypatch .setattr (tc , "PRODUCTION_TASKCLUSTER_ROOT_URL" , None )
@@ -382,8 +382,8 @@ def test_list_task_group_incomplete_tasks(responses, root_url):
382382
383383
384384def test_get_ancestors (responses , root_url ):
385- tc .get_task_definition .clear ()
386- tc ._get_deps .clear ()
385+ tc .get_task_definition .cache_clear ()
386+ tc ._get_deps .cache_clear ()
387387 base_url = f"{ root_url } /api/queue/v1/task"
388388 responses .add (
389389 responses .GET ,
@@ -457,8 +457,8 @@ def test_get_ancestors(responses, root_url):
457457
458458
459459def test_get_ancestors_string (responses , root_url ):
460- tc .get_task_definition .clear ()
461- tc ._get_deps .clear ()
460+ tc .get_task_definition .cache_clear ()
461+ tc ._get_deps .cache_clear ()
462462 base_url = f"{ root_url } /api/queue/v1/task"
463463 responses .add (
464464 responses .GET ,
0 commit comments