def testScenario1(self): port = "79" utils.before("scenario1", [utils.getuser(), constants.SC1_FILE_SERVERPY, port]) res, code = utils.sr_cmd( "-r role1 -c 'python %s -p %s'" % (constants.SC1_FILE_SERVERPY, port), 1) utils.multipleAssertCommand(res, code, code == 0, res.count("OK") == 1) utils.after()
def testUserInfoCommandArgNoRole(self): utils.before("testInfo/infousernorole") res, code = utils.sr_cmd("-i -c null") utils.multipleAssertCommand( res, code, code == 0, utils.assertCount(res, r"you can\\'t execute this command", 1), utils.assertCount(res, "sr -c", 0), utils.assertCount(res, "roles", 0), utils.assertCount(res, "null", 0)) utils.after()
def setUp(self): utils.before("testInfo/infouser", [utils.getuser()]) return super().setUp()
def setUp(self): utils.before("testInfo/infogroup", utils.getgroups()) return super().setUp()
def setUp(self): utils.before("testRoles/configuration4", ["null"] + utils.getgroups()) return super().setUp()
def setUp(self): utils.before("testRoles/configuration1", [utils.getuser()]) return super().setUp()