To unit-test a Python script that listens for UPDATE_DTABLE
events, I would like to use the Python API to emulate the manual insertion of a row in a table that is grouped by a linked record columns. In other words, is there a way to use the Python API functionality to generate an update event of the following form:
"op_type": "insert_row",
"table_id": "...",
"row_id": "...",
"row_insert_position": "insert_below",
"row_data": {
"_id": "...",
"_participants": [],
"_creator": "...",
"_ctime": "",
"_last_modifier": "...",
"_mtime": ""
},
"links_data": {
"l2qt": {
"link_table_id": "...",
"linked_table_id": "...",
"id_linked_rows_ids": {
"...": [
"..."
]
}
}
}
}
It doesn’t seem like I can use base.insert_row
and then base.add_link
, because that doesn’t result in the same event data as when a user inserts the row with the linked record into the table through the GUI.