def test_chipmunk_will_not_replace_existing_attribute(self): Chipmunk.a = "acorn" with self.assertRaises(AttributeError): Chipmunk.a = "walnut" with self.assertRaises(AttributeError): Chipmunk.store_data('a', "acorn")
def test_that_chipmunk_can_hold_nut(self): Chipmunk.a = "acorn" self.assertEqual("acorn", Chipmunk.a) Chipmunk.store_data('b', "walnut") self.assertEqual("walnut", Chipmunk.b)