def METHOD_NAME(self):
    data = {
        'message_id': '63026767-029d-417e-9148-77f4da49f49a',
        'group_id': '866350e8-1492-497e-b12b-c079287d51dd',
        'created': 1628512774.0,
        'message_type': 'foo',
    }
    with self.assertRaisesRegex(
        ValueError, "'foo' is not a valid MessageType"
    ):
        Message.deserialize(data)