Преглед изворни кода

Fix typo in SIT check_delete and enable SG delete checks

Enis Afgan пре 8 година
родитељ
комит
15f70a0e0b
2 измењених фајлова са 3 додато и 3 уклоњено
  1. 1 1
      test/helpers/standard_interface_tests.py
  2. 2 2
      test/test_security_service.py

+ 1 - 1
test/helpers/standard_interface_tests.py

@@ -65,8 +65,8 @@ def check_delete(test, service, obj, perform_delete=False):
         obj.delete()
 
     objs = service.list()
-    found_objs = [o for o in objs if obj.id == obj.id]
     test.assertTrue(
+    found_objs = [o for o in objs if o.id == obj.id]
         len(found_objs) == 0,
         "Object %s in service %s should have been deleted but still exists."
         % (type(obj).__name__, found_objs))

+ 2 - 2
test/test_security_service.py

@@ -88,7 +88,7 @@ class CloudSecurityServiceTestCase(ProviderTestBase):
             sit.check_standard_behaviour(
                 self, self.provider.security.security_groups, sg)
 
-        # sit.check_delete(self, self.provider.security.security_groups, sg)
+        sit.check_delete(self, self.provider.security.security_groups, sg)
         sgl = self.provider.security.security_groups.list()
         found_sg = [g for g in sgl if g.name == name]
         self.assertTrue(
@@ -147,7 +147,7 @@ class CloudSecurityServiceTestCase(ProviderTestBase):
 #                 "JSON SG representation {0} does not match expected {1}"
 #                 .format(sg.to_json(), json_repr))
 
-        # sit.check_delete(self, self.provider.security.security_groups, sg)
+        sit.check_delete(self, self.provider.security.security_groups, sg)
         sgl = self.provider.security.security_groups.list()
         found_sg = [g for g in sgl if g.name == name]
         self.assertTrue(