File: test_net_app_resource_operations.py

package info (click to toggle)
python-azure 20250603%2Bgit-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 851,724 kB
  • sloc: python: 7,362,925; ansic: 804; javascript: 287; makefile: 195; sh: 145; xml: 109
file content (44 lines) | stat: -rw-r--r-- 2,110 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
from devtools_testutils import AzureMgmtRecordedTestCase, recorded_by_proxy
import setup
import pytest
import azure.mgmt.netapp.models


class TestNetAppResourceOperations(AzureMgmtRecordedTestCase):

    def setup_method(self, method):
        self.client = self.create_mgmt_client(azure.mgmt.netapp.NetAppManagementClient)

    # Before tests are run live a resource group needs to be created along with vnet and subnet
    # Note that when tests are run in live mode it is best to run one test at a time.
    @pytest.mark.skip(reason="Skipping this test for service side issue re-enable when fixed")
    @recorded_by_proxy
    def test_query_network_sibling_set(self):

        print("Starting test_query_network_sibling_set")
        try:
            self.client.net_app_resource.query_network_sibling_set(
                setup.LOCATION,
                "9760acf5-4638-11e7-9bdb-020073ca3333",
                "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sdk-python-tests-rg-tmp/providers/Microsoft.Network/virtualNetworks/testVnet/subnets/sdk-python-tests-subnet",
            )
        except Exception as e:
            assert str(e).startswith("(NoNicsFoundForSubnet)")
        print("Finished with test_query_network_sibling_set")

    @pytest.mark.skip(reason="Skipping this test for service side issue re-enable when fixed")
    @recorded_by_proxy
    def test_begin_update_network_sibling_set(self):

        print("Starting test_begin_update_network_sibling_set")
        try:
            self.client.net_app_resource.begin_update_network_sibling_set(
                setup.LOCATION,
                "9760acf5-4638-11e7-9bdb-020073ca3333",
                "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sdk-python-tests-rg-tmp/providers/Microsoft.Network/virtualNetworks/testVnet/subnets/sdk-python-tests-subnet",
                "herpiderp",
                "Standard",
            )
        except Exception as e:
            assert str(e).startswith("(NetworkSiblingSetChanged)")
        print("Finished with test_begin_update_network_sibling_set")