From 1b1fb342372467d50f6c617cdc7fca6f5e07cd60 Mon Sep 17 00:00:00 2001 From: Ben Hearsum Date: Fri, 24 Oct 2025 15:02:36 -0400 Subject: [PATCH] fix: mock away TASKCLUSTER_{CLIENT_ID,ACCESS_TOKEN} I happened to run tests in a termimal where I was signed into a cluster, and got a test failure because of it: ``` E AssertionError: expected call not found. E Expected: mock({'rootUrl': 'http://taskcluster-prod'}) E Actual: mock({'rootUrl': 'http://taskcluster-prod', 'credentials': ...}) ``` --- test/test_util_taskcluster.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/test_util_taskcluster.py b/test/test_util_taskcluster.py index e2c926a99..6f98a0df4 100644 --- a/test/test_util_taskcluster.py +++ b/test/test_util_taskcluster.py @@ -21,6 +21,8 @@ def mock_environ(monkeypatch, root_url): # Ensure user specified environment variables don't interfere with URLs. monkeypatch.setenv("TASKCLUSTER_ROOT_URL", root_url) monkeypatch.delenv("TASKCLUSTER_PROXY_URL", raising=False) + monkeypatch.delenv("TASKCLUSTER_CLIENT_ID", raising=False) + monkeypatch.delenv("TASKCLUSTER_ACCESS_TOKEN", raising=False) @pytest.fixture(autouse=True)