def runTest(self): logging.info(" -- Test PEP01: testing schema validation/expecting OK") file_handle = open(os.path.abspath("testdata/PEP/01/idp5TestExampleOrg_idpXml.xml")) ed = SAMLEntityDescriptor(file_handle) retmsg = ed.validate_xsd() file_handle.close() self.assertIsNone(retmsg, msg=retmsg)
def runTest(self): logging.info(' -- Test PEP01: testing schema validation/expecting OK') file_handle = open(os.path.abspath('testdata/PEP/01/idp5TestExampleOrg_idpXml.xml')) ed = SAMLEntityDescriptor(file_handle) retmsg = ed.validate_xsd() file_handle.close() self.assertIsNone(retmsg, msg=retmsg)
def runTest(self): logging.info(" -- Test PEP02a: test calling schema validation/expecting invalid root element") with self.assertRaises(InputValueError) as context: with open(os.path.abspath("testdata/PEP/02/idp6TestExampleOrg_idpXml.xml")) as f: ed = SAMLEntityDescriptor(f) retmsg = ed.validate_xsd() logging.info(" -- Test PEP02b: test calling schema validation/expecting invalid schema") with self.assertRaises(InvalidSamlXmlSchemaError) as context: with open(os.path.abspath("testdata/PEP/02/idp7TestExampleOrg_idpXml.xml")) as f: ed = SAMLEntityDescriptor(f) retmsg = ed.validate_xsd()
def runTest(self): logging.info(' -- Test PEP02a: test calling schema validation/expecting invalid root element') with self.assertRaises(InputValueError) as context: with open(os.path.abspath('testdata/PEP/02/idp6TestExampleOrg_idpXml.xml')) as f: ed = SAMLEntityDescriptor(f) retmsg = ed.validate_xsd() logging.info(' -- Test PEP02b: test calling schema validation/expecting invalid schema') with self.assertRaises(InvalidSamlXmlSchemaError) as context: with open(os.path.abspath('testdata/PEP/02/idp7TestExampleOrg_idpXml.xml')) as f: ed = SAMLEntityDescriptor(f) retmsg = ed.validate_xsd()