def manifest(self): errors, warnings, manifest_config = xmlutil.parse_manifest(self.config['manifest_path']) if errors or warnings: Printer.start_test('Checking manifest') for error in errors: Printer.error("Manifest: %s" % error) for warning in warnings: Printer.warn("Manifest: %s" % warning)
def _check_node_exists(self, t, xpath, behavior="error"): try: xmlutil.node_exists(t, xpath) except NodeNotFoundException: msg = "XPath %s was not found in the response" % xpath if behavior == "error": Printer.error(msg) else: Printer.warn(msg)
def manifest(self): errors, warnings, manifest_config = xmlutil.parse_manifest( self.config['manifest_path']) if errors or warnings: Printer.start_test('Checking manifest') for error in errors: Printer.error("Manifest: %s" % error) for warning in warnings: Printer.warn("Manifest: %s" % warning)
def _check_node_exists(self, t, xpath, behavior="error"): try: xmlutil.node_exists(t, xpath) return True except NodeNotFoundException: msg = "XPath %s was not found in the response" % xpath if behavior == "error": Printer.error(msg) else: Printer.warn(msg) return False