Skip to content

Commit

Permalink
wip; Add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mccoyp committed Feb 25, 2021
1 parent 13dd7a2 commit 1ee77f7
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions sdk/keyvault/azure-keyvault-keys/tests/test_crypto_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -491,6 +491,15 @@ def test_calls_service_for_operations_unsupported_locally():
assert supports_nothing.wrap_key.call_count == 0


def test_local_only_mode_no_service_calls():
"""With a local-only CryptographyClient, it shouldn't call the service if an operation can't be performed locally"""

mock_client = mock.Mock()
jwk = mock.Mock(spec=JsonWebKey)
client = CryptographyClient.from_jkw(key_id="https://localhost/fake/key/version", jwk=jwk)
client._client = mock_client


def test_prefers_local_provider():
"""The client should complete operations locally whenever possible"""

Expand Down

0 comments on commit 1ee77f7

Please sign in to comment.