当前位置: 首页>>代码示例>>Python>>正文


Python Smtp.delay方法代码示例

本文整理汇总了Python中blackhole.smtp.Smtp.delay方法的典型用法代码示例。如果您正苦于以下问题:Python Smtp.delay方法的具体用法?Python Smtp.delay怎么用?Python Smtp.delay使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在blackhole.smtp.Smtp的用法示例。


在下文中一共展示了Smtp.delay方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_delay_and_mode

# 需要导入模块: from blackhole.smtp import Smtp [as 别名]
# 或者: from blackhole.smtp.Smtp import delay [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"
开发者ID:kura,项目名称:blackhole,代码行数:9,代码来源:test_smtp_switches.py

示例2: test_delay_switch_range_overrides_config

# 需要导入模块: from blackhole.smtp import Smtp [as 别名]
# 或者: from blackhole.smtp.Smtp import delay [as 别名]
 def test_delay_switch_range_overrides_config(self):
     cfile = create_config(("delay=30",))
     Config(cfile).load()
     smtp = Smtp([])
     smtp.delay = "40, 45"
     assert smtp.delay in [x for x in range(40, 46)]
     assert smtp.config.delay is 30
开发者ID:kura,项目名称:blackhole,代码行数:9,代码来源:test_smtp_switches.py

示例3: test_delay_switch_overrides_config_single

# 需要导入模块: from blackhole.smtp import Smtp [as 别名]
# 或者: from blackhole.smtp.Smtp import delay [as 别名]
 def test_delay_switch_overrides_config_single(self):
     cfile = create_config(("delay=30",))
     Config(cfile).load()
     smtp = Smtp([])
     smtp.delay = "60"
     assert smtp.delay is 60
     assert smtp.config.delay is 30
开发者ID:kura,项目名称:blackhole,代码行数:9,代码来源:test_smtp_switches.py

示例4: test_delay_range_and_mode

# 需要导入模块: from blackhole.smtp import Smtp [as 别名]
# 或者: from blackhole.smtp.Smtp import delay [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"
开发者ID:kura,项目名称:blackhole,代码行数:9,代码来源:test_smtp_switches.py

示例5: test_delay_switch_more_than_2

# 需要导入模块: from blackhole.smtp import Smtp [as 别名]
# 或者: from blackhole.smtp.Smtp import delay [as 别名]
 def test_delay_switch_more_than_2(self):
     cfile = create_config(("",))
     Config(cfile).load()
     smtp = Smtp([])
     smtp.delay = "1, 2, 3"
     assert smtp.delay is None
开发者ID:kura,项目名称:blackhole,代码行数:8,代码来源:test_smtp_switches.py

示例6: test_delay_switch_range_max_higher_than_60

# 需要导入模块: from blackhole.smtp import Smtp [as 别名]
# 或者: from blackhole.smtp.Smtp import delay [as 别名]
 def test_delay_switch_range_max_higher_than_60(self):
     cfile = create_config(("",))
     Config(cfile).load()
     smtp = Smtp([])
     smtp.delay = "59, 70"
     assert smtp.delay in [59, 60]
开发者ID:kura,项目名称:blackhole,代码行数:8,代码来源:test_smtp_switches.py

示例7: test_delay_switch_range_min_higher_than_max

# 需要导入模块: from blackhole.smtp import Smtp [as 别名]
# 或者: from blackhole.smtp.Smtp import delay [as 别名]
 def test_delay_switch_range_min_higher_than_max(self):
     cfile = create_config(("",))
     Config(cfile).load()
     smtp = Smtp([])
     smtp.delay = "20, 10"
     assert smtp.delay is None
开发者ID:kura,项目名称:blackhole,代码行数:8,代码来源:test_smtp_switches.py

示例8: test_delay_switch_invalid_range_negatives

# 需要导入模块: from blackhole.smtp import Smtp [as 别名]
# 或者: from blackhole.smtp.Smtp import delay [as 别名]
 def test_delay_switch_invalid_range_negatives(self):
     cfile = create_config(("",))
     Config(cfile).load()
     smtp = Smtp([])
     smtp.delay = "-10, -1"
     assert smtp.delay is None
开发者ID:kura,项目名称:blackhole,代码行数:8,代码来源:test_smtp_switches.py

示例9: test_delay_switch_invalid_max_range_value_no_config

# 需要导入模块: from blackhole.smtp import Smtp [as 别名]
# 或者: from blackhole.smtp.Smtp import delay [as 别名]
 def test_delay_switch_invalid_max_range_value_no_config(self):
     cfile = create_config(("",))
     Config(cfile).load()
     smtp = Smtp([])
     smtp.delay = "15, eighteen"
     assert smtp.delay is None
开发者ID:kura,项目名称:blackhole,代码行数:8,代码来源:test_smtp_switches.py

示例10: test_delay_switch_invalid_single_value_config_60

# 需要导入模块: from blackhole.smtp import Smtp [as 别名]
# 或者: from blackhole.smtp.Smtp import delay [as 别名]
 def test_delay_switch_invalid_single_value_config_60(self):
     cfile = create_config(("delay=30",))
     Config(cfile).load()
     smtp = Smtp([])
     smtp.delay = "fifteen"
     assert smtp.delay is 30
开发者ID:kura,项目名称:blackhole,代码行数:8,代码来源:test_smtp_switches.py

示例11: test_delay

# 需要导入模块: from blackhole.smtp import Smtp [as 别名]
# 或者: from blackhole.smtp.Smtp import delay [as 别名]
 def test_delay(self):
     smtp = Smtp([])
     smtp.delay = "30"
     smtp._flags = {"delay": 20}
     assert smtp.delay == 20
开发者ID:kura,项目名称:blackhole,代码行数:7,代码来源:test_smtp_switches.py

示例12: test_delay_range

# 需要导入模块: from blackhole.smtp import Smtp [as 别名]
# 或者: from blackhole.smtp.Smtp import delay [as 别名]
 def test_delay_range(self):
     smtp = Smtp([])
     smtp.delay = "30"
     smtp._flags = {"delay": ["10", "20"]}
     assert smtp.delay in (10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20)
开发者ID:kura,项目名称:blackhole,代码行数:7,代码来源:test_smtp_switches.py

示例13: test_delay_switch_invalid_single_negative_value

# 需要导入模块: from blackhole.smtp import Smtp [as 别名]
# 或者: from blackhole.smtp.Smtp import delay [as 别名]
 def test_delay_switch_invalid_single_negative_value(self):
     cfile = create_config(("",))
     Config(cfile).load()
     smtp = Smtp([])
     smtp.delay = "-10"
     assert smtp.delay is None
开发者ID:kura,项目名称:blackhole,代码行数:8,代码来源:test_smtp_switches.py

示例14: test_delay_switch_not_above_max

# 需要导入模块: from blackhole.smtp import Smtp [as 别名]
# 或者: from blackhole.smtp.Smtp import delay [as 别名]
 def test_delay_switch_not_above_max(self):
     cfile = create_config(("",))
     Config(cfile).load()
     smtp = Smtp([])
     smtp.delay = "90"
     assert smtp.delay is 60
开发者ID:kura,项目名称:blackhole,代码行数:8,代码来源:test_smtp_switches.py


注:本文中的blackhole.smtp.Smtp.delay方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。