def test_setAttr_wrongType(self): c = Configuration(self.stringParametersConfig()) try: c.ConfigParam1 = 1 self.fail("Exception expected") except TypeError, e: self.assertEquals("str value expected, got int", e.args[0])
def test_setAttr_affects_getItem(self): c = Configuration(self.stringParametersConfig()) c.ConfigParam1 = 'newvalue' self.assertEqual(c["ConfigParam1"], "newvalue")
def test_setAttr(self): c = Configuration(self.stringParametersConfig()) c.ConfigParam1 = 'newvalue' self.assertEqual(c.ConfigParam1, "newvalue")