示例#1
0
 def test_set_nonexistant_field(self):
     entry = address.entry.Entry()
     with self.assertRaises(KeyError):
         entry.set_attr("undefined", "value")
示例#2
0
 def test_change_field_value(self):
     entry = address.entry.Entry("William")
     self.assertEquals(entry.get_attr(address.entry.FNAME), "William")
     entry.set_attr(address.entry.FNAME, "Bill")
     self.assertEquals(entry.get_attr(address.entry.FNAME), "Bill")