|
| 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