예제 #1
0
 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)
예제 #2
0
 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))
예제 #3
0
 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)
예제 #4
0
 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)