Rename cases to modules and minor bug fix
[integration/test.git] / test / tools / CSIT_Test / base / testmodule.py
index 64df8773ddf5636c425f1cb8bbd89033aff3a16a..928b67b0bfa2334a98975656134f8395a0cf33d8 100644 (file)
@@ -22,6 +22,16 @@ class TestModule(object):
         self.contentType = contentType
         self.prefix = prefix
 
+
+    def extract_properties(self, content, key, property):
+        """
+        Return all nodes.
+        """
+        if not isinstance(content, dict) or not content.has_key(key):
+            return None
+        else:
+            return [e.get(property) for e in content[key]]
+
     def get_entries(self, suffix=None, key=None):
         """
         Get the existed entries in the service.