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"])
Esempio n. 2
0
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"])
Esempio n. 3
0
    def setUp(self):
        unittest.TestCase.setUp(self)

        self.attribute = []
        self.option = AppendingOption("name", "add FOO", self.attribute,
                                      ValueFromOneArgument("FOO"))
    def setUp(self):
        unittest.TestCase.setUp(self)

        self.attribute = []
        self.option = AppendingOption("name", "add FOO", self.attribute, ValueFromOneArgument("FOO"))