本文整理汇总了Python中src.tests.lib.RuleTestTemplate.RuleTest.setUp方法的典型用法代码示例。如果您正苦于以下问题:Python RuleTest.setUp方法的具体用法?Python RuleTest.setUp怎么用?Python RuleTest.setUp使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类src.tests.lib.RuleTestTemplate.RuleTest
的用法示例。
在下文中一共展示了RuleTest.setUp方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: setUp
# 需要导入模块: from src.tests.lib.RuleTestTemplate import RuleTest [as 别名]
# 或者: from src.tests.lib.RuleTestTemplate.RuleTest import setUp [as 别名]
def setUp(self):
RuleTest.setUp(self)
self.rule = DisableSerialLoginPrompts(self.config, self.environ,
self.logdispatch,
self.statechglogger)
self.rulename = self.rule.rulename
self.rulenumber = self.rule.rulenumber
示例2: setUp
# 需要导入模块: from src.tests.lib.RuleTestTemplate import RuleTest [as 别名]
# 或者: from src.tests.lib.RuleTestTemplate.RuleTest import setUp [as 别名]
def setUp(self):
RuleTest.setUp(self)
self.rule = InstallCasperSuite(self.config, self.environ,
self.logdispatch,
self.statechglogger)
self.rulename = self.rule.rulename
self.rulenumber = self.rule.rulenumber
示例3: setUp
# 需要导入模块: from src.tests.lib.RuleTestTemplate import RuleTest [as 别名]
# 或者: from src.tests.lib.RuleTestTemplate.RuleTest import setUp [as 别名]
def setUp(self):
RuleTest.setUp(self)
self.rule = SecureMTA(self.config,
self.environ,
self.logdispatch,
self.statechglogger)
self.rulename = self.rule.rulename
self.rulenumber = self.rule.rulenumber
self.ch = CommandHelper(self.logdispatch)
if self.environ.operatingsystem == "Mac OS X":
self.isMac = True
else:
self.isMac = False
if not self.isMac:
self.ph = Pkghelper(self.logdispatch, self.environ)
self.origState = [False, False, False, False]
self.smPath = "/etc/mail/sendmail.cf"
self.smTmp = "/tmp/" + os.path.split(self.smPath)[1] + ".utmp"
self.pfPathlist = ['/etc/postfix/main.cf',
'/private/etc/postfix/main.cf',
'/usr/lib/postfix/main.cf']
self.pfPath = ""
for path in self.pfPathlist:
if os.path.exists(path):
self.pfPath = path
if self.pfPath == "":
self.pfPath = "/etc/postfix/main.cf"
self.pfTmp = "/tmp/" + os.path.split(self.pfPath)[1] + ".utmp"
示例4: setUp
# 需要导入模块: from src.tests.lib.RuleTestTemplate import RuleTest [as 别名]
# 或者: from src.tests.lib.RuleTestTemplate.RuleTest import setUp [as 别名]
def setUp(self):
RuleTest.setUp(self)
self.rule = DisableAdminLoginOverride(self.config, self.environ,
self.logdispatch,
self.statechglogger)
self.rulename = self.rule.rulename
self.rulenumber = self.rule.rulenumber
示例5: setUp
# 需要导入模块: from src.tests.lib.RuleTestTemplate import RuleTest [as 别名]
# 或者: from src.tests.lib.RuleTestTemplate.RuleTest import setUp [as 别名]
def setUp(self):
RuleTest.setUp(self)
self.rule = SecureDHCPServer(self.config,
self.environ,
self.logdispatch,
self.statechglogger)
self.rulename = self.rule.rulename
self.rulenumber = self.rule.rulenumber
示例6: setUp
# 需要导入模块: from src.tests.lib.RuleTestTemplate import RuleTest [as 别名]
# 或者: from src.tests.lib.RuleTestTemplate.RuleTest import setUp [as 别名]
def setUp(self):
RuleTest.setUp(self)
self.rule = ConfigureGatekeeper(self.config, self.environ,
self.logdispatch,
self.statechglogger)
self.rulename = self.rulename
self.rulenumber = self.rule.rulenumber
self.ch = CommandHelper(self.logdispatch)
示例7: setUp
# 需要导入模块: from src.tests.lib.RuleTestTemplate import RuleTest [as 别名]
# 或者: from src.tests.lib.RuleTestTemplate.RuleTest import setUp [as 别名]
def setUp(self):
RuleTest.setUp(self)
self.rule = InstalledSoftwareVerification(self.config,
self.environ,
self.logdispatch,
self.statechglogger)
self.rulename = self.rule.rulename
self.rulenumber = self.rule.rulenumber
示例8: setUp
# 需要导入模块: from src.tests.lib.RuleTestTemplate import RuleTest [as 别名]
# 或者: from src.tests.lib.RuleTestTemplate.RuleTest import setUp [as 别名]
def setUp(self):
RuleTest.setUp(self)
self.rule = DisableGUILogon(self.config, self.environ,
self.logdispatch, self.statechglogger)
self.rulename = self.rule.rulename
self.rulenumber = self.rule.rulenumber
self.ch = CommandHelper(self.logdispatch)
self.sh = ServiceHelper(self.environ, self.logdispatch)
示例9: setUp
# 需要导入模块: from src.tests.lib.RuleTestTemplate import RuleTest [as 别名]
# 或者: from src.tests.lib.RuleTestTemplate.RuleTest import setUp [as 别名]
def setUp(self):
RuleTest.setUp(self)
self.rule = SoftwarePatching(self.config,
self.environ,
self.logdispatch,
self.statechglogger)
self.rulename = self.rule.rulename
self.rulenumber = self.rule.rulenumber
示例10: setUp
# 需要导入模块: from src.tests.lib.RuleTestTemplate import RuleTest [as 别名]
# 或者: from src.tests.lib.RuleTestTemplate.RuleTest import setUp [as 别名]
def setUp(self):
RuleTest.setUp(self)
self.rule = DisableBluetooth(self.config,
self.environ,
self.logdispatch,
self.statechglogger)
self.rulename = self.rule.rulename
self.rulenumber = self.rule.rulenumber
示例11: setUp
# 需要导入模块: from src.tests.lib.RuleTestTemplate import RuleTest [as 别名]
# 或者: from src.tests.lib.RuleTestTemplate.RuleTest import setUp [as 别名]
def setUp(self):
RuleTest.setUp(self)
self.rule = ConfigureKerberos(self.config,
self.environ,
self.logdispatch,
self.statechglogger)
self.rulename = self.rule.rulename
self.rulenumber = self.rule.rulenumber
self.ch = CommandHelper(self.logdispatch)
self.fh = FileHelper(self.logdispatch, self.statechglogger)
if self.environ.getosfamily() == 'darwin':
self.files = {"kerb5.conf":
{"path": "/etc/krb5.conf",
"remove": True,
"content": None,
"permissions": None,
"owner": None,
"group": None,
"eventid": str(self.rulenumber).zfill(4) +
"kerb5ut"},
"edu.mit.Kerberos":
{"path": "/Library/Preferences/edu.mit.Kerberos",
"remove": False,
"content": "test",
"permissions": None,
"owner": None,
"group": None,
"eventid": str(self.rulenumber).zfill(4) +
"Kerberosut"},
"edu.mit.Kerberos.krb5kdc.launchd":
{"path": "/Library/Preferences/edu.mit.Kerberos.krb5kdc.launchd",
"remove": False,
"content": "test",
"permissions": None,
"owner": None,
"group": None,
"eventid": str(self.rulenumber).zfill(4) +
"krb5kdcut"},
"edu.mit.Kerberos.kadmind.launchd":
{"path": "/Library/Preferences/edu.mit.Kerberos.kadmind.launchd",
"remove": False,
"content": "test",
"permissions": None,
"owner": None,
"group": None,
"eventid": str(self.rulenumber).zfill(4) +
"kadmindut"},
}
else:
self.files = {"kerb5.conf":
{"path": "/etc/krb5.conf",
"remove": True,
"content": None,
"permissions": None,
"owner": None,
"group": None,
"eventid": str(self.rulenumber).zfill(4) +
"kerb5ut"}}
示例12: setUp
# 需要导入模块: from src.tests.lib.RuleTestTemplate import RuleTest [as 别名]
# 或者: from src.tests.lib.RuleTestTemplate.RuleTest import setUp [as 别名]
def setUp(self):
RuleTest.setUp(self)
self.rule = DisableWeakAuthentication(self.config,
self.environ,
self.logdispatch,
self.statechglogger)
self.rulename = self.rule.rulename
self.rulenumber = self.rule.rulenumber
self.ch = CommandHelper(self.logdispatch)
示例13: setUp
# 需要导入模块: from src.tests.lib.RuleTestTemplate import RuleTest [as 别名]
# 或者: from src.tests.lib.RuleTestTemplate.RuleTest import setUp [as 别名]
def setUp(self):
RuleTest.setUp(self)
self.rule = VerifyAccPerms(self.config,
self.environ,
self.logdispatch,
self.statechglogger)
self.rulename = self.rule.rulename
self.rulenumber = self.rule.rulenumber
self.ch = CommandHelper(self.logdispatch)
示例14: setUp
# 需要导入模块: from src.tests.lib.RuleTestTemplate import RuleTest [as 别名]
# 或者: from src.tests.lib.RuleTestTemplate.RuleTest import setUp [as 别名]
def setUp(self):
RuleTest.setUp(self)
self.rule = SystemAccounting(self.config,
self.environ,
self.logdispatch,
self.statechglogger)
self.rulename = self.rule.rulename
self.rulenumber = self.rule.rulenumber
self.ch = CommandHelper(self.logdispatch)
示例15: setUp
# 需要导入模块: from src.tests.lib.RuleTestTemplate import RuleTest [as 别名]
# 或者: from src.tests.lib.RuleTestTemplate.RuleTest import setUp [as 别名]
def setUp(self):
RuleTest.setUp(self)
self.rule = AuditSSHKeys(self.config,
self.environ,
self.logdispatch,
self.statechglogger)
self.rulename = self.rule.rulename
self.rulenumber = self.rule.rulenumber
self.ignoreresults = True