本文整理汇总了Python中clacks.common.Environment.reset方法的典型用法代码示例。如果您正苦于以下问题:Python Environment.reset方法的具体用法?Python Environment.reset怎么用?Python Environment.reset使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类clacks.common.Environment
的用法示例。
在下文中一共展示了Environment.reset方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: TestSambaPlugin
# 需要导入模块: from clacks.common import Environment [as 别名]
# 或者: from clacks.common.Environment import reset [as 别名]
# http://clacks-project.org
#
# Copyright:
# (C) 2010-2012 GONICUS GmbH, Germany, http://www.gonicus.de
#
# License:
# GPL-2: http://www.gnu.org/licenses/gpl-2.0.html
#
# See the LICENSE file in the project's top-level directory for details.
import os
import unittest
from clacks.common import Environment
from clacks.agent.plugins.samba.hash import SambaHash
Environment.reset()
Environment.config = os.path.join(os.path.dirname(os.path.realpath(__file__)), "test.conf")
Environment.noargs = True
class TestSambaPlugin(unittest.TestCase):
def test_mksmbhash(self):
pass
#TODO: obj not set
#sambaUtils = SambaHash()
#self.assertEqual(sambaUtils.mksmbhash('secret'), '552902031BEDE9EFAAD3B435B51404EE:878D8014606CDA29677A44EFA1353FC7')
#self.assertEqual(sambaUtils.mksmbhash(''), 'AAD3B435B51404EEAAD3B435B51404EE:31D6CFE0D16AE931B73C59D7E0C089C0')
#self.assertRaises(TypeError, sambaUtils.mksmbhash, None, '')