本文整理汇总了Python中blackhole.smtp.Smtp.mode方法的典型用法代码示例。如果您正苦于以下问题:Python Smtp.mode方法的具体用法?Python Smtp.mode怎么用?Python Smtp.mode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类blackhole.smtp.Smtp
的用法示例。
在下文中一共展示了Smtp.mode方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_delay_range_and_mode
# 需要导入模块: from blackhole.smtp import Smtp [as 别名]
# 或者: from blackhole.smtp.Smtp import mode [as 别名]
def test_delay_range_and_mode(self):
smtp = Smtp([])
smtp.delay = "30"
smtp.mode = "accept"
smtp._flags = {"delay": ["10", "20"], "mode": "bounce"}
assert smtp.delay in (10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20)
assert smtp.mode == "bounce"
示例2: test_delay_and_mode
# 需要导入模块: from blackhole.smtp import Smtp [as 别名]
# 或者: from blackhole.smtp.Smtp import mode [as 别名]
def test_delay_and_mode(self):
smtp = Smtp([])
smtp.delay = "30"
smtp.mode = "accept"
smtp._flags = {"delay": "20", "mode": "bounce"}
assert smtp.delay == 20
assert smtp.mode == "bounce"
示例3: test_mode_valid_overrides_config
# 需要导入模块: from blackhole.smtp import Smtp [as 别名]
# 或者: from blackhole.smtp.Smtp import mode [as 别名]
def test_mode_valid_overrides_config(self):
cfile = create_config(("mode=bounce",))
Config(cfile).load()
smtp = Smtp([])
assert smtp.mode == "bounce"
smtp.mode = "accept"
assert smtp.mode == "accept"
示例4: test_mode
# 需要导入模块: from blackhole.smtp import Smtp [as 别名]
# 或者: from blackhole.smtp.Smtp import mode [as 别名]
def test_mode(self):
smtp = Smtp([])
smtp.mode = "accept"
smtp._flags = {"mode": "bounce"}
assert smtp.mode == "bounce"
示例5: test_mode_valid
# 需要导入模块: from blackhole.smtp import Smtp [as 别名]
# 或者: from blackhole.smtp.Smtp import mode [as 别名]
def test_mode_valid(self):
cfile = create_config(("",))
Config(cfile).load()
smtp = Smtp([])
smtp.mode = "bounce"
assert smtp.mode == "bounce"
示例6: test_mode_invalid
# 需要导入模块: from blackhole.smtp import Smtp [as 别名]
# 或者: from blackhole.smtp.Smtp import mode [as 别名]
def test_mode_invalid(self):
cfile = create_config(("",))
Config(cfile).load()
smtp = Smtp([])
smtp.mode = "kura"
assert smtp.mode == "accept"