Skip to content

Commit ee9f648

Browse files
authored
fix: mock away TASKCLUSTER_{CLIENT_ID,ACCESS_TOKEN} (taskcluster#839)
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': ...}) ```
1 parent 928330f commit ee9f648

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

test/test_util_taskcluster.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ def mock_environ(monkeypatch, root_url):
2121
# Ensure user specified environment variables don't interfere with URLs.
2222
monkeypatch.setenv("TASKCLUSTER_ROOT_URL", root_url)
2323
monkeypatch.delenv("TASKCLUSTER_PROXY_URL", raising=False)
24+
monkeypatch.delenv("TASKCLUSTER_CLIENT_ID", raising=False)
25+
monkeypatch.delenv("TASKCLUSTER_ACCESS_TOKEN", raising=False)
2426

2527

2628
@pytest.fixture(autouse=True)

0 commit comments

Comments
 (0)