Skip to content

Commit ff43bf1

Browse files
authored
Update azure-mgmt-keyvault async test recording (Azure#18973)
1 parent 64f06ce commit ff43bf1

File tree

2 files changed

+701
-5232
lines changed

2 files changed

+701
-5232
lines changed

sdk/keyvault/azure-mgmt-keyvault/tests/_aio_testcase.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,21 @@
22
from unittest.mock import Mock
33

44
from azure.core.credentials import AccessToken
5+
from azure_devtools.scenario_tests.patches import mock_in_unit_test
56
from devtools_testutils import AzureMgmtTestCase
67

8+
9+
def skip_sleep(unit_test):
10+
async def immediate_return(_):
11+
return
12+
13+
return mock_in_unit_test(unit_test, "asyncio.sleep", immediate_return)
14+
15+
716
class AzureMgmtAsyncTestCase(AzureMgmtTestCase):
17+
def __init__(self, *args, **kwargs):
18+
super().__init__(*args, **kwargs)
19+
self.replay_patches.append(skip_sleep)
820

921
def setUp(self):
1022
super(AzureMgmtAsyncTestCase, self).setUp()

0 commit comments

Comments
 (0)