Просмотр исходного кода

Add a test for GETting a subnet

Enis Afgan 9 лет назад
Родитель
Сommit
4cca889174
1 измененных файлов с 5 добавлено и 0 удалено
  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,
                     "List subnets does not return the expected subnet %s" %
                     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()
             found_subnet = [n for n in subnetl if n.name == subnet_name]