本文整理汇总了Python中soapfish.soap_dispatch.SOAPDispatcher._validate_header方法的典型用法代码示例。如果您正苦于以下问题:Python SOAPDispatcher._validate_header方法的具体用法?Python SOAPDispatcher._validate_header怎么用?Python SOAPDispatcher._validate_header使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类soapfish.soap_dispatch.SOAPDispatcher
的用法示例。
在下文中一共展示了SOAPDispatcher._validate_header方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_can_detect_invalid_wsa_header
# 需要导入模块: from soapfish.soap_dispatch import SOAPDispatcher [as 别名]
# 或者: from soapfish.soap_dispatch.SOAPDispatcher import _validate_header [as 别名]
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))
示例2: test_can_validate_wsa_header
# 需要导入模块: from soapfish.soap_dispatch import SOAPDispatcher [as 别名]
# 或者: from soapfish.soap_dispatch.SOAPDispatcher import _validate_header [as 别名]
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)