本文整理匯總了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")