  def testGetCredentialsMissingEnvVar(self, mock_azure_credentials):
    """Test that missing environment variables will raise an error."""
    # If an environment variable is missing, a RuntimeError should be raised
    mock_azure_credentials.return_value = None
    os.environ['AZURE_SUBSCRIPTION_ID'] = 'fake-subscription-id'
    os.environ["AZURE_CLIENT_ID"] = 'fake-client-id'
    os.environ["AZURE_CLIENT_SECRET"] = 'fake-client-secret'
    # Omitting AZURE_TENANT_ID

    with self.assertRaises(errors.CredentialsConfigurationError) as error:
      _, _ = common.GetCredentials()
      mock_azure_credentials.assert_not_called()
    self.assertEqual(
        'No supported credentials found. If using environment variables '
        'please make sure to define: [AZURE_SUBSCRIPTION_ID, AZURE_CLIENT_ID, '
        'AZURE_CLIENT_SECRET, AZURE_TENANT_ID].', str(error.exception))
Test that missing environment variables will raise an error.
tests/providers/azure/internal/test_common.py