本文整理汇总了Python中askomics.libaskomics.ParamManager.ParamManager.set_param方法的典型用法代码示例。如果您正苦于以下问题:Python ParamManager.set_param方法的具体用法?Python ParamManager.set_param怎么用?Python ParamManager.set_param使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类askomics.libaskomics.ParamManager.ParamManager
的用法示例。
在下文中一共展示了ParamManager.set_param方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_get_param
# 需要导入模块: from askomics.libaskomics.ParamManager import ParamManager [as 别名]
# 或者: from askomics.libaskomics.ParamManager.ParamManager import set_param [as 别名]
def test_get_param(self):
m = ParamManager(self.settings, self.request.session)
m.set_param("test","testValue")
d = m.get_param("test")
assert d == "testValue"
d = m.get_param("test2")
assert d == ""
示例2: test_send_mails
# 需要导入模块: from askomics.libaskomics.ParamManager import ParamManager [as 别名]
# 或者: from askomics.libaskomics.ParamManager.ParamManager import set_param [as 别名]
def test_send_mails(self):
m = ParamManager(self.settings, self.request.session)
m.send_mails("bidon_url","[email protected]","Subject","Message")
m.set_param('askomics.smtp_host','smtp.test.fr')
m.send_mails("bidon_url","[email protected]","Subject","Message")
m.set_param('askomics.smtp_port','20')
m.send_mails("bidon_url","[email protected]","Subject","Message")
m.set_param('askomics.smtp_login','test')
m.send_mails("bidon_url","[email protected]","Subject","Message")
m.set_param('askomics.smtp_password','test')
m.send_mails("bidon_url","[email protected]","Subject","Message")
示例3: test_is_defined
# 需要导入模块: from askomics.libaskomics.ParamManager import ParamManager [as 别名]
# 或者: from askomics.libaskomics.ParamManager.ParamManager import set_param [as 别名]
def test_is_defined(self):
m = ParamManager(self.settings, self.request.session)
m.set_param("test","testValue")
assert m.is_defined("test")
assert not m.is_defined("test2")
示例4: test_set_param
# 需要导入模块: from askomics.libaskomics.ParamManager import ParamManager [as 别名]
# 或者: from askomics.libaskomics.ParamManager.ParamManager import set_param [as 别名]
def test_set_param(self):
m = ParamManager(self.settings, self.request.session)
m.set_param("test","test")