-
Notifications
You must be signed in to change notification settings - Fork 3.2k
[Key Vault] Add ID parsing method for keys #15044
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| **kwargs | ||
| ) | ||
| return UnwrapResult(key_id=self._key_id, algorithm=algorithm, key=operation_result.result) | ||
| return UnwrapResult(key_id=self._key_id.source_id, algorithm=algorithm, key=operation_result.result) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| return UnwrapResult(key_id=self._key_id.source_id, algorithm=algorithm, key=operation_result.result) | |
| return UnwrapResult(key_id=self.key_id, algorithm=algorithm, key=operation_result.result) |
| print(parsed_key_id.version) | ||
| print(parsed_key_id.source_id) | ||
| # [END parse_key_vault_key_id] | ||
| self.assertEqual(parsed_key_id.name, key_name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New tests should use assert instead of unittest.TestCase assertions:
| self.assertEqual(parsed_key_id.name, key_name) | |
| assert parsed_key_id.name == key_name |
sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/__init__.py
Show resolved
Hide resolved
| from _shared.test_case import KeyVaultTestCase | ||
|
|
||
| # pre-apply the client_cls positional argument so it needn't be explicitly passed below | ||
| KeyVaultClientPreparer = functools.partial(_KeyVaultClientPreparer, KeyClient) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpicking, but this isn't really an improvement because this module only uses the preparer once.
Co-authored-by: Charles Lowell <[email protected]>
Part of fix to #13006.
Merged implementation for certificates: #14518.