Skip to content

Commit 1347908

Browse files
author
Nicola Camillucci
committed
Updated tests
1 parent f40fab2 commit 1347908

3 files changed

Lines changed: 11 additions & 3 deletions

File tree

sdk/keyvault/azure-keyvault-administration/assets.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
"AssetsRepo": "Azure/azure-sdk-assets",
33
"AssetsRepoPrefixPath": "python",
44
"TagPrefix": "python/keyvault/azure-keyvault-administration",
5-
"Tag": "python/keyvault/azure-keyvault-administration_ab4ab43926"
5+
"Tag": "python/keyvault/azure-keyvault-administration_007a803c2c"
66
}

sdk/keyvault/azure-keyvault-keys/assets.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
"AssetsRepo": "Azure/azure-sdk-assets",
33
"AssetsRepoPrefixPath": "python",
44
"TagPrefix": "python/keyvault/azure-keyvault-keys",
5-
"Tag": "python/keyvault/azure-keyvault-keys_7741e21de3"
5+
"Tag": "python/keyvault/azure-keyvault-keys_229759aadf"
66
}

sdk/keyvault/azure-keyvault-keys/tests/test_challenge_auth_async.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
the challenge cache is global to the process.
88
"""
99
import asyncio
10+
import functools
1011
from itertools import product
1112
import os
1213
import time
@@ -30,7 +31,6 @@
3031
from _shared.helpers_async import async_validating_transport
3132
from _shared.test_case_async import KeyVaultTestCase
3233
from test_challenge_auth import (
33-
empty_challenge_cache,
3434
get_random_url,
3535
add_url_port,
3636
CAE_CHALLENGE_RESPONSE,
@@ -81,6 +81,14 @@ async def test_multitenant_authentication(self, client, is_hsm, **kwargs):
8181
else:
8282
os.environ.pop("AZURE_TENANT_ID")
8383

84+
def empty_challenge_cache(fn):
85+
@functools.wraps(fn)
86+
async def wrapper(**kwargs):
87+
HttpChallengeCache.clear()
88+
assert len(HttpChallengeCache._cache) == 0
89+
return await fn(**kwargs)
90+
91+
return wrapper
8492

8593
@pytest.mark.asyncio
8694
@empty_challenge_cache

0 commit comments

Comments
 (0)