diff --git a/tests/external/api/test_credentials.py b/tests/external/api/test_credentials.py index f13588b316..dcb7e10670 100644 --- a/tests/external/api/test_credentials.py +++ b/tests/external/api/test_credentials.py @@ -3,8 +3,8 @@ AzureCliCredential, DeviceCodeCredential, ) - from click.exceptions import Exit + from data_safe_haven.directories import config_dir from data_safe_haven.external.api.credentials import ( AzureSdkCredential, @@ -36,9 +36,7 @@ def test_confirm_credentials_interactive_fail( ): DeferredCredential.cache_ = set() credential = AzureSdkCredential(skip_confirmation=False) - with pytest.raises( - Exit - ): + with pytest.raises(Exit): credential.get_credential() def test_confirm_credentials_interactive_cache( @@ -60,9 +58,7 @@ def test_decode_token_error( self, mock_azureclicredential_get_token_invalid # noqa: ARG002 ): credential = AzureSdkCredential(skip_confirmation=True) - with pytest.raises( - Exit - ): + with pytest.raises(Exit): credential.decode_token(credential.token)