本文整理汇总了Python中src.tests.lib.RuleTestTemplate.RuleTest类的典型用法代码示例。如果您正苦于以下问题:Python RuleTest类的具体用法?Python RuleTest怎么用?Python RuleTest使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了RuleTest类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: setUp
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
开发者ID:inscriptionweb,项目名称:stonix,代码行数:7,代码来源:zzzTestRuleDisableSerialLoginPrompts.py
示例2: setUp
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
开发者ID:CSD-Public,项目名称:stonix,代码行数:7,代码来源:zzzTestRuleInstallCasperSuite.py
示例3: setUp
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"
开发者ID:pombredanne,项目名称:stonix,代码行数:29,代码来源:zzzTestRuleSecureMTA.py
示例4: setUp
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
开发者ID:CSD-Public,项目名称:stonix,代码行数:7,代码来源:zzzTestRuleDisableAdminLoginOverride.py
示例5: setUp
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
开发者ID:CSD-Public,项目名称:stonix,代码行数:8,代码来源:zzzTestRuleSecureDHCPServer.py
示例6: setUp
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)
开发者ID:inscriptionweb,项目名称:stonix,代码行数:8,代码来源:zzzTestRuleConfigureGatekeeper.py
示例7: setUp
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
开发者ID:inscriptionweb,项目名称:stonix,代码行数:8,代码来源:zzzTestRuleInstalledSoftwareVerification.py
示例8: setUp
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)
开发者ID:inscriptionweb,项目名称:stonix,代码行数:8,代码来源:zzzTestRuleDisableGUILogon.py
示例9: setUp
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
开发者ID:CSD-Public,项目名称:stonix,代码行数:8,代码来源:zzzTestRuleSoftwarePatching.py
示例10: setUp
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
开发者ID:CSD-Public,项目名称:stonix,代码行数:8,代码来源:zzzTestRuleDisableBluetooth.py
示例11: setUp
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"}}
开发者ID:inscriptionweb,项目名称:stonix,代码行数:58,代码来源:zzzTestRuleConfigureKerberos.py
示例12: setUp
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)
开发者ID:inscriptionweb,项目名称:stonix,代码行数:9,代码来源:zzzTestRuleDisableWeakAuthentication.py
示例13: setUp
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)
开发者ID:CSD-Public,项目名称:stonix,代码行数:9,代码来源:zzzTestRuleVerifyAccPerms.py
示例14: setUp
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)
开发者ID:inscriptionweb,项目名称:stonix,代码行数:9,代码来源:zzzTestRuleSystemAccounting.py
示例15: setUp
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
开发者ID:CSD-Public,项目名称:stonix,代码行数:9,代码来源:zzzTestRuleAuditSSHKeys.py
示例16: setUp
def setUp(self):
RuleTest.setUp(self)
self.rule = DisableInteractiveStartup(self.config,
self.environ,
self.logdispatch,
self.statechglogger)
self.rulename = self.rule.rulename
self.rulenumber = self.rule.rulenumber
self.ch = CommandHelper(self.logdispatch)
开发者ID:CSD-Public,项目名称:stonix,代码行数:9,代码来源:zzzTestRuleDisableInteractiveStartup.py
示例17: setUp
def setUp(self):
RuleTest.setUp(self)
self.rule = SystemIntegrityProtection(self.config,
self.environ,
self.logdispatch,
self.statechglogger)
self.rulename = self.rule.rulename
self.rulenumber = self.rule.rulenumber
self.ch = CommandHelper(self.logdispatch)
开发者ID:CSD-Public,项目名称:stonix,代码行数:9,代码来源:zzzTestRuleSystemIntegrityProtection.py
示例18: setUp
def setUp(self):
RuleTest.setUp(self)
self.rule = RestrictAdminSSH(self.config,
self.environ,
self.logdispatch,
self.statechglogger)
self.rulename = self.rule.rulename
self.rulenumber = self.rule.rulenumber
self.ch = CommandHelper(self.logdispatch)
开发者ID:CSD-Public,项目名称:stonix,代码行数:9,代码来源:zzzTestRuleRestrictAdminSSH.py
示例19: setUp
def setUp(self):
RuleTest.setUp(self)
self.rule = RemoveBadDotFiles(self.config,
self.environ,
self.logdispatch,
self.statechglogger)
self.rulename = self.rule.rulename
self.rulenumber = self.rule.rulenumber
self.ch = CommandHelper(self.logdispatch)
开发者ID:CSD-Public,项目名称:stonix,代码行数:9,代码来源:zzzTestRuleRemoveBadDotFiles.py
示例20: setUp
def setUp(self):
RuleTest.setUp(self)
self.rule = AuditNetworkSniffing(self.config,
self.environ,
self.logdispatch,
self.statechglogger)
self.rulename = self.rule.rulename
self.rulenumber = self.rule.rulenumber
self.ch = CommandHelper(self.logdispatch)
开发者ID:CSD-Public,项目名称:stonix,代码行数:9,代码来源:zzzTestRuleAuditNetworkSniffing.py
注:本文中的src.tests.lib.RuleTestTemplate.RuleTest类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论