(dialect, context)
| 472 | yield batch |
| 473 | |
| 474 | def _exec_insertmany_context(dialect, context): |
| 475 | with mock.patch.object( |
| 476 | dialect, |
| 477 | "_deliver_insertmanyvalues_batches", |
| 478 | new=_deliver_insertmanyvalues_batches, |
| 479 | ): |
| 480 | return orig_conn(dialect, context) |
| 481 | |
| 482 | connection._exec_insertmany_context = _exec_insertmany_context |