Esempio n. 1
0
 def assert_valid_simservs(self, xml_doc, passthrough_put):
     result = xsd._validate(xml_doc, self.schema_path)
     self.assertTrue(result)
Esempio n. 2
0
File: xsd.py Progetto: rkday/crest
 def test_validate(self, get_parser, fromstring):
     get_parser.return_value = "parser"
     xsd._validate("xml", "schema_name")
     get_parser.assert_called_once_with("schema_name")
     fromstring.assert_called_once_with("xml", "parser")
Esempio n. 3
0
 def test_validate(self, get_parser, fromstring):
     get_parser.return_value = "parser"
     xsd._validate("xml", "schema_name")
     get_parser.assert_called_once_with("schema_name")
     fromstring.assert_called_once_with("xml", "parser")
Esempio n. 4
0
 def assert_valid_simservs(self, file_name, passthrough_put):
     with open(os.path.join(XML_DIR, file_name)) as f:
         xml_doc = f.read()
     result = xsd._validate(xml_doc, simservs.SCHEMA_PATH)
     self.assertTrue(result)
Esempio n. 5
0
 def assert_valid_simservs(self, xml_doc, passthrough_put):
     result = xsd._validate(xml_doc, self.schema_path)
     self.assertTrue(result)