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

Add test to make sure keypair material is none and accessible

Nuwan Goonasekera пре 8 година
родитељ
комит
5145707b6b
1 измењених фајлова са 4 додато и 0 уклоњено
  1. 4 0
      test/test_security_service.py

+ 4 - 0
test/test_security_service.py

@@ -35,6 +35,10 @@ class CloudSecurityServiceTestCase(ProviderTestBase):
             self.assertIsNotNone(
                 kp.material,
                 "KeyPair material is empty but it should not be.")
+            # get the keypair again - keypair material should now be empty
+            kp = self.provider.security.key_pairs.get(kp.id)
+            self.assertIsNone(kp.material,
+                              "Keypair material should now be empty")
 
     @helpers.skipIfNoService(['security.security_groups'])
     def test_crud_security_group(self):