From 25a91572f9be4a7318d54294a43a87e710b4ecaa Mon Sep 17 00:00:00 2001 From: Ayato Tokubi Date: Fri, 5 Jul 2024 18:32:14 +0100 Subject: [PATCH] fix lint error --- .../latest/unit/test_dynamic_validators.py | 26 +++++++++---------- .../tests/latest/unit/test_validators.py | 12 ++++----- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/python/az/aro/azext_aro/tests/latest/unit/test_dynamic_validators.py b/python/az/aro/azext_aro/tests/latest/unit/test_dynamic_validators.py index c7373f4c6..f564c48a2 100644 --- a/python/az/aro/azext_aro/tests/latest/unit/test_dynamic_validators.py +++ b/python/az/aro/azext_aro/tests/latest/unit/test_dynamic_validators.py @@ -174,8 +174,8 @@ test_validate_cidr_data = [ test_validate_cidr_data, ids=[i[0] for i in test_validate_cidr_data] ) -@ patch('azext_aro._dynamic_validators.get_subnet') -@ patch('azext_aro._dynamic_validators.parse_resource_id') +@patch('azext_aro._dynamic_validators.get_subnet') +@patch('azext_aro._dynamic_validators.parse_resource_id') def test_validate_cidr( # Mocked functions: parse_resource_id_mock, get_subnet_mock, @@ -305,10 +305,10 @@ test_validate_subnets_data = [ test_validate_subnets_data, ids=[i[0] for i in test_validate_subnets_data] ) -@ patch('azext_aro._dynamic_validators.get_subnet') -@ patch('azext_aro._dynamic_validators.get_mgmt_service_client') -@ patch('azext_aro._dynamic_validators.parse_resource_id') -@ patch('azext_aro._dynamic_validators.is_valid_resource_id') +@patch('azext_aro._dynamic_validators.get_subnet') +@patch('azext_aro._dynamic_validators.get_mgmt_service_client') +@patch('azext_aro._dynamic_validators.parse_resource_id') +@patch('azext_aro._dynamic_validators.is_valid_resource_id') def test_validate_subnets( # Mocked functions: is_valid_resource_id_mock, parse_resource_id_mock, get_mgmt_service_client_mock, get_subnet_mock, @@ -400,10 +400,10 @@ test_validate_vnets_data = [ test_validate_vnets_data, ids=[i[0] for i in test_validate_vnets_data] ) -@ patch('azext_aro._dynamic_validators.get_vnet') -@ patch('azext_aro._dynamic_validators.get_mgmt_service_client') -@ patch('azext_aro._dynamic_validators.parse_resource_id') -@ patch('azext_aro._dynamic_validators.is_valid_resource_id') +@patch('azext_aro._dynamic_validators.get_vnet') +@patch('azext_aro._dynamic_validators.get_mgmt_service_client') +@patch('azext_aro._dynamic_validators.parse_resource_id') +@patch('azext_aro._dynamic_validators.is_valid_resource_id') def test_validate_vnets( # Mocked functions: is_valid_resource_id_mock, parse_resource_id_mock, get_mgmt_service_client_mock, get_vnet_mock, @@ -473,8 +473,8 @@ test_validate_resource_data = [ test_validate_resource_data, ids=[i[0] for i in test_validate_resource_data] ) -@ patch('azext_aro._dynamic_validators.has_role_assignment_on_resource') -@ patch('azext_aro._dynamic_validators.parse_resource_id') +@patch('azext_aro._dynamic_validators.has_role_assignment_on_resource') +@patch('azext_aro._dynamic_validators.parse_resource_id') def test_validate_resources( # Mocked functions: parse_resource_id_mock, has_role_assignment_on_resource_mock, @@ -523,7 +523,7 @@ test_validate_version_data = [ test_validate_version_data, ids=[i[0] for i in test_validate_version_data] ) -@ patch('azext_aro.custom.aro_get_versions') +@patch('azext_aro.custom.aro_get_versions') def test_validate_version( # Mocked Functions diff --git a/python/az/aro/azext_aro/tests/latest/unit/test_validators.py b/python/az/aro/azext_aro/tests/latest/unit/test_validators.py index ed1503c87..00c7feba2 100644 --- a/python/az/aro/azext_aro/tests/latest/unit/test_validators.py +++ b/python/az/aro/azext_aro/tests/latest/unit/test_validators.py @@ -508,15 +508,15 @@ test_validate_subnet_data = [ ] -@ pytest.mark.parametrize( +@pytest.mark.parametrize( "test_description, namespace, key, is_valid_resource_id_mock_return_value, parse_resource_id_mock_return_value, get_subscription_id_mock_return_value, get_network_vnet_subnet_show_mock_return_value, cmd, expected_exception", test_validate_subnet_data, ids=[i[0] for i in test_validate_subnet_data] ) -@ patch('azext_aro._validators.subnet_show') -@ patch('azext_aro._validators.get_subscription_id') -@ patch('azext_aro._validators.parse_resource_id') -@ patch('azext_aro._validators.is_valid_resource_id') +@patch('azext_aro._validators.subnet_show') +@patch('azext_aro._validators.get_subscription_id') +@patch('azext_aro._validators.parse_resource_id') +@patch('azext_aro._validators.is_valid_resource_id') def test_validate_subnet( # Mocked functions: is_valid_resource_id_mock, parse_resource_id_mock, get_subscription_id_mock, get_network_vnet_subnet_show_mock, @@ -668,7 +668,7 @@ test_validate_vnet_resource_group_name_data = [ ) def test_validate_vnet_resource_group_name(test_description, namespace, expected_namespace_vnet_resource_group_name): validate_vnet_resource_group_name(namespace) - assert(namespace.vnet_resource_group_name == + assert (namespace.vnet_resource_group_name == expected_namespace_vnet_resource_group_name)