We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9707083 commit 90af8cfCopy full SHA for 90af8cf
1 file changed
sdk/storage/azure-storage-blob/tests/test_cpk_n_async.py
@@ -19,6 +19,7 @@
19
AccountSasPermissions,
20
BlobBlock,
21
BlobSasPermissions,
22
+ BlobServiceClient as SyncBlobServiceClient,
23
BlobType,
24
ContainerEncryptionScope,
25
ContainerSasPermissions,
@@ -56,9 +57,10 @@ async def _setup(self, bsc):
56
57
58
def _teardown(self, bsc):
59
if self.is_live:
- loop = asyncio.get_event_loop()
60
try:
61
- loop.run_until_complete(bsc.delete_container(self.container_name))
+ sync_credential = self.get_credential(SyncBlobServiceClient, is_async=False)
62
+ with SyncBlobServiceClient(account_url=bsc.url, credential=sync_credential) as sync_bsc:
63
+ sync_bsc.delete_container(self.container_name)
64
except HttpResponseError:
65
pass
66
0 commit comments