def test_can_detect_invalid_wsa_header(self): dispatcher = SOAPDispatcher(echo_service()) header = wsa.Header.parsexml( '<Header><Invalid xmlns="http://www.w3.org/2005/08/addressing">/Action</Invalid></Header>', ) with self.assertRaises(etree.DocumentInvalid): dispatcher._validate_header(header)
def test_can_detect_invalid_wsa_header(self): dispatcher = SOAPDispatcher(echo_service()) header = wsa.Header.parsexml('<Header><Invalid xmlns="http://www.w3.org/2005/08/addressing">/Action</Invalid></Header>') assert_raises(etree.DocumentInvalid, lambda: dispatcher._validate_header(header))
def test_can_validate_wsa_header(self): dispatcher = SOAPDispatcher(echo_service()) header = wsa.Header.parsexml('<Header><Action xmlns="http://www.w3.org/2005/08/addressing">/Action</Action></Header>') dispatcher._validate_header(header)
def test_can_validate_wsa_header(self): dispatcher = SOAPDispatcher(echo_service()) header = wsa.Header.parsexml( '<Header><Action xmlns="http://www.w3.org/2005/08/addressing">/Action</Action></Header>' ) dispatcher._validate_header(header)