to_dict assert