本文整理汇总了Python中blackhole.smtp.Smtp.lookup_handler方法的典型用法代码示例。如果您正苦于以下问题:Python Smtp.lookup_handler方法的具体用法?Python Smtp.lookup_handler怎么用?Python Smtp.lookup_handler使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类blackhole.smtp.Smtp
的用法示例。
在下文中一共展示了Smtp.lookup_handler方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_handler_lookup
# 需要导入模块: from blackhole.smtp import Smtp [as 别名]
# 或者: from blackhole.smtp.Smtp import lookup_handler [as 别名]
def test_handler_lookup():
smtp = Smtp([])
assert smtp.lookup_handler("AUTH CRAM-MD5") == smtp.auth_CRAM_MD5
assert smtp.lookup_handler("AUTH LOGIN") == smtp.auth_LOGIN
assert smtp.lookup_handler("AUTH PLAIN") == smtp.auth_PLAIN
assert smtp.lookup_handler("AUTH") == smtp.auth_UNKNOWN
assert smtp.lookup_handler("AUTH KURA") == smtp.auth_UNKNOWN
assert smtp.lookup_handler("HELP") == smtp.do_HELP
assert smtp.lookup_handler("DATA") == smtp.do_DATA
assert smtp.lookup_handler("EHLO") == smtp.do_EHLO
assert smtp.lookup_handler("ETRN") == smtp.do_ETRN
assert smtp.lookup_handler("EXPN") == smtp.do_EXPN
assert smtp.lookup_handler("HELO") == smtp.do_HELO
assert smtp.lookup_handler("MAIL") == smtp.do_MAIL
assert smtp.lookup_handler("NOOP") == smtp.do_NOOP
assert smtp.lookup_handler("QUIT") == smtp.do_QUIT
assert smtp.lookup_handler("RCPT") == smtp.do_RCPT
assert smtp.lookup_handler("RSET") == smtp.do_RSET
assert smtp.lookup_handler("VRFY") == smtp.do_VRFY
assert smtp.lookup_handler("STARTTLS") == smtp.do_STARTTLS
assert smtp.lookup_handler("KURA") == smtp.do_UNKNOWN
assert smtp.lookup_handler("") == smtp.do_UNKNOWN
assert smtp.lookup_handler("STARTTLS") == smtp.do_STARTTLS
assert smtp.lookup_handler("HELP DATA") == smtp.help_DATA
assert smtp.lookup_handler("HELP EHLO") == smtp.help_EHLO
assert smtp.lookup_handler("HELP ETRN") == smtp.help_ETRN
assert smtp.lookup_handler("HELP EXPN") == smtp.help_EXPN
assert smtp.lookup_handler("HELP HELO") == smtp.help_HELO
assert smtp.lookup_handler("HELP MAIL") == smtp.help_MAIL
assert smtp.lookup_handler("HELP NOOP") == smtp.help_NOOP
assert smtp.lookup_handler("HELP QUIT") == smtp.help_QUIT
assert smtp.lookup_handler("HELP RCPT") == smtp.help_RCPT
assert smtp.lookup_handler("HELP RSET") == smtp.help_RSET
assert smtp.lookup_handler("HELP VRFY") == smtp.help_VRFY
assert smtp.lookup_handler("HELP KURA") == smtp.help_UNKNOWN