diff --git a/lib/spack/spack/test/cmd/install.py b/lib/spack/spack/test/cmd/install.py
index 05f9eaae985d453ff83c96fc50b849d368dcbc63..238fd71a91997454a9b38cba7839d61f149ead9b 100644
--- a/lib/spack/spack/test/cmd/install.py
+++ b/lib/spack/spack/test/cmd/install.py
@@ -676,7 +676,7 @@ def test_install_help_cdash(capsys):
 
 
 @pytest.mark.disable_clean_stage_check
-def test_cdash_auth_token(tmpdir, capfd):
+def test_cdash_auth_token(tmpdir, install_mockery, capfd):
     # capfd interferes with Spack's capturing
     with capfd.disabled():
         os.environ['SPACK_CDASH_AUTH_TOKEN'] = 'asdf'