def runTest(self): # assert defaults self.assertFalse(FC3_Timezone().isUtc) self.assertFalse(F18_Timezone().nontp) # pass self.assert_parse("timezone Eastern", "timezone Eastern\n") # On FC6 and later, we write out --isUtc regardless of what the input was. if self.__class__.__name__ == "FC3_TestCase": self.assert_parse("timezone --utc Eastern", "timezone --utc Eastern\n") else: self.assert_parse("timezone --utc Eastern", "timezone --isUtc Eastern\n") # fail self.assert_parse_error("timezone") self.assert_parse_error("timezone Eastern Central") self.assert_parse_error("timezone --blah Eastern") self.assert_parse_error("timezone --utc") self.assert_parse_error("timezone --bogus-option") # extra test coverage cmd = self.handler().commands[self.command] cmd.timezone = None self.assertEqual(cmd.__str__(), "")
def runTest(self): for cmd_class in [FC6_Timezone, F25_Timezone, RHEL7_Timezone]: cmd = cmd_class() op = cmd._getParser() for action in op._actions: if '--isUtc' in action.option_strings: self.assertFalse(action.default) cmd = F18_Timezone() self.assertEqual(cmd.__str__(), '')
def runTest(self): cmd = F18_Timezone() self.assertEqual(cmd.__str__(), '')