def test_from_dict_arg_speaker(self): d = {"text": "テスト", "speaker": {"name": "bot"}} self.assertEqual(Message.from_dict(d), Message(text="テスト", speaker=Speaker(name="bot")))
def test_from_dict(self): d = {"text": "テスト"} self.assertEqual(Message.from_dict(d), Message(text="テスト"))