Skip to content

Commit 77403d2

Browse files
[sql] fix import error (#36432)
* fix * update-testcase * update aio testcase * Update dev_requirements.txt --------- Co-authored-by: ChenxiJiang333 <[email protected]> Co-authored-by: ChenxiJiang333 <[email protected]>
1 parent fb5c723 commit 77403d2

File tree

6 files changed

+50
-3
lines changed

6 files changed

+50
-3
lines changed

sdk/sql/azure-mgmt-sql/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Release History
22

3+
## 4.0.0b18 (2024-07-11)
4+
5+
### Bugs Fixed
6+
7+
- Fix import error when import from azure.mgmt.sql.aio
8+
39
## 4.0.0b17 (2024-05-20)
410

511
### Features Added

sdk/sql/azure-mgmt-sql/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/sql/azure-mgmt-sql",
5-
"Tag": "python/sql/azure-mgmt-sql_3957d80cf6"
5+
"Tag": "python/sql/azure-mgmt-sql_50ce2366db"
66
}

sdk/sql/azure-mgmt-sql/azure/mgmt/sql/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
88

9-
VERSION = "4.0.0b17"
9+
VERSION = "4.0.0b18"

sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_databases_operations.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
build_export_request,
3737
build_failover_request,
3838
build_get_request,
39-
build_import_method_request,
4039
build_import_request,
4140
build_list_by_elastic_pool_request,
4241
build_list_by_server_request,
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
-e ../../../tools/azure-sdk-tools
22
-e ../../resources/azure-mgmt-resource
33
../../identity/azure-identity
4+
aiohttp
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# coding: utf-8
2+
3+
#-------------------------------------------------------------------------
4+
# Copyright (c) Microsoft Corporation. All rights reserved.
5+
# Licensed under the MIT License. See License.txt in the project root for
6+
# license information.
7+
#--------------------------------------------------------------------------
8+
9+
from azure.mgmt.sql.aio import SqlManagementClient
10+
from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer
11+
from devtools_testutils.aio import recorded_by_proxy_async
12+
13+
AZURE_LOCATION = 'eastus'
14+
15+
class TestMgmtSqlAsync(AzureMgmtRecordedTestCase):
16+
17+
def setup_method(self, method):
18+
self.client = self.create_mgmt_client(SqlManagementClient)
19+
20+
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
21+
@recorded_by_proxy_async
22+
async def test_server_list_by_resource_group(self, resource_group):
23+
response = self.client.servers.list_by_resource_group(resource_group.name)
24+
assert [r async for r in response] == []
25+
26+
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
27+
@recorded_by_proxy_async
28+
async def test_managed_instances_list_by_resource_group(self, resource_group):
29+
response = self.client.managed_instances.list_by_resource_group(resource_group.name)
30+
assert [r async for r in response] == []
31+
32+
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
33+
@recorded_by_proxy_async
34+
async def test_instance_pools_list_by_resource_group(self, resource_group):
35+
response = self.client.instance_pools.list_by_resource_group(resource_group.name)
36+
assert [r async for r in response] == []
37+
38+
@recorded_by_proxy_async
39+
async def test_list_operations(self):
40+
response = self.client.operations.list()
41+
assert response

0 commit comments

Comments
 (0)