Skip to content

Commit ed5eb58

Browse files
authored
aio test case (#35895)
1 parent 19c386b commit ed5eb58

File tree

2 files changed

+49
-4
lines changed

2 files changed

+49
-4
lines changed

sdk/oracledatabase/azure-mgmt-oracledatabase/tests/test_cli_mgmt_oracledatabase.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
# coding: utf-8
2-
32
#-------------------------------------------------------------------------
43
# Copyright (c) Microsoft Corporation. All rights reserved.
54
# Licensed under the MIT License. See License.txt in the project root for
65
# license information.
76
#--------------------------------------------------------------------------
8-
9-
import unittest
7+
import pytest
108
from azure.mgmt.oracledatabase import OracleDatabaseMgmtClient
119
from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy
1210

@@ -32,7 +30,7 @@ def test_list_cloud_exadata_infrastructures_by_resource_group(self, resource_gro
3230
def test_list_autonomous_databases_by_resource_group(self, resource_group):
3331
assert list(self.client.autonomous_databases.list_by_resource_group(resource_group.name)) == []
3432

35-
@unittest.skip("Lack of permission")
33+
@pytest.mark.skip("Lack of permission")
3634
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
3735
@recorded_by_proxy
3836
def test_list_db_system_shapes_by_resource_group(self, resource_group):
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# coding: utf-8
2+
#-------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for
5+
# license information.
6+
#--------------------------------------------------------------------------
7+
import pytest
8+
from azure.mgmt.oracledatabase.aio import OracleDatabaseMgmtClient
9+
from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer
10+
from devtools_testutils.aio import recorded_by_proxy_async
11+
12+
AZURE_LOCATION = 'eastus'
13+
14+
class TestMgmtOracleDatabaseAsync(AzureMgmtRecordedTestCase):
15+
16+
def setup_method(self, method):
17+
self.client = self.create_mgmt_client(OracleDatabaseMgmtClient, is_async=True)
18+
19+
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
20+
@recorded_by_proxy_async
21+
async def test_list_cloud_vm_clusters_by_resource_group(self, resource_group):
22+
response = self.client.cloud_vm_clusters.list_by_resource_group(resource_group.name)
23+
assert [r async for r in response] == []
24+
25+
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
26+
@recorded_by_proxy_async
27+
async def test_list_cloud_exadata_infrastructures_by_resource_group(self, resource_group):
28+
response = self.client.cloud_exadata_infrastructures.list_by_resource_group(resource_group.name)
29+
assert [r async for r in response] == []
30+
31+
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
32+
@recorded_by_proxy_async
33+
async def test_list_autonomous_databases_by_resource_group(self, resource_group):
34+
response = self.client.autonomous_databases.list_by_resource_group(resource_group.name)
35+
assert [r async for r in response] == []
36+
37+
@pytest.mark.skip("Lack of permission")
38+
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
39+
@recorded_by_proxy_async
40+
async def test_list_db_system_shapes_by_resource_group(self, resource_group):
41+
response = self.client.db_system_shapes.list_by_location(location=AZURE_LOCATION)
42+
assert [r async for r in response] == []
43+
44+
@recorded_by_proxy_async
45+
async def test_list_operations(self):
46+
response = self.client.operations.list()
47+
assert len([r async for r in response]) > 0

0 commit comments

Comments
 (0)