def testStructure (self): '''Test for the manifests JSON output''' if self.json: messages = app_manifest_structure_validator(self.json) if len(messages) > 0 : self.fail ("App manifest structure test failed\n" + "\n".join(messages))
def testStructure (self): '''Test for the manifests JSON output''' if self.json: if type(self.json) != list: self.fail ("The JSON payload should be a list") # Because we have a list of manifests, we have to iterate over the items messages = [] for manifest in self.json: messages += app_manifest_structure_validator(manifest) if len(messages) > 0 : self.fail ("App manifests structure test failed\n" + "\n".join(messages))