def METHOD_NAME():
    """Test tuya Enum datatype."""
    data = b"\x04\x00\x01\x40"
    extra = b"extra data"
    r, rest = TuyaData.deserialize(data + extra)
    assert rest == extra
    assert r.dp_type == 4
    assert r.raw == b"\x40"
    assert r.payload == 0x40
    r.payload = 0x42
    assert r.raw == b"\x42"