  def testGetCredentialsFromProfileFile(self, mock_azure_credentials):
    """Test that credentials can be obtained from profile files."""
    # If the file is correctly formatted, then things should work correctly
    mock_azure_credentials.return_value = None

    os.environ['AZURE_CREDENTIALS_PATH'] = os.path.join(
        os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(
            os.path.realpath(__file__))))), azure_mocks.JSON_FILE)
    subscription_id, _ = common.GetCredentials(
        profile_name='test_profile_name')
    self.assertEqual(
        'fake-subscription-id-from-credential-file', subscription_id)
    mock_azure_credentials.assert_called()
Test that credentials can be obtained from profile files.
tests/providers/azure/internal/test_common.py