Parcourir la source

Add a test for GETting a subnet

Enis Afgan il y a 9 ans
Parent
commit
4cca889174
1 fichiers modifiés avec 5 ajouts et 0 suppressions
  1. 5 0
      test/test_network_service.py

+ 5 - 0
test/test_network_service.py

@@ -46,6 +46,11 @@ class CloudNetworkServiceTestCase(ProviderTestBase):
                     len(list_subnetl) == 1,
                     len(list_subnetl) == 1,
                     "List subnets does not return the expected subnet %s" %
                     "List subnets does not return the expected subnet %s" %
                     subnet_name)
                     subnet_name)
+                # test get method
+                sn = self.provider.network.subnets.get(subnet.id)
+                self.assertTrue(
+                    subnet.id == sn.id,
+                    "GETting subnet should return the same subnet")
 
 
             subnetl = self.provider.network.subnets.list()
             subnetl = self.provider.network.subnets.list()
             found_subnet = [n for n in subnetl if n.name == subnet_name]
             found_subnet = [n for n in subnetl if n.name == subnet_name]