class AppendingOptionTestCase(unittest.TestCase): def setUp(self): unittest.TestCase.setUp(self) self.attribute = [] self.option = AppendingOption("name", "add FOO", self.attribute, ValueFromOneArgument("FOO")) def testActivateActivates(self): self.option.activate("xxx") self.assertEqual(self.attribute, ["xxx"]) self.option.activate("yyy") self.assertEqual(self.attribute, ["xxx", "yyy"])
def setUp(self): unittest.TestCase.setUp(self) self.attribute = [] self.option = AppendingOption("name", "add FOO", self.attribute, ValueFromOneArgument("FOO"))