def test_can_update_message_text(self): message = Message( "memento mori", datetime(2011, 3, 1, 12, 34, 32), self.contact1 ) message.text("Non semper erit aestas") self.assertEqual(message._text, "Non semper erit aestas")
def test_new_text_must_be_str(self): message = Message( "memento mori", datetime(2011, 3, 1, 12, 34, 32), self.contact1 ) with self.assertRaises(TypeError): message.text(1000)
def test_message_text(self): message = Message( "memento mori", datetime(2011, 3, 1, 12, 34, 32), self.contact1 ) self.assertIs(message._text, message.text())