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)
示例#3
0
    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)
示例#4
0
 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