(self)
| 732 | sess.execute(insert(User), orig_params) |
| 733 | |
| 734 | def test_chained_events_one(self): |
| 735 | sess = Session(testing.db, future=True) |
| 736 | |
| 737 | @event.listens_for(sess, "do_orm_execute") |
| 738 | def one(ctx): |
| 739 | ctx.update_execution_options(one=True) |
| 740 | |
| 741 | @event.listens_for(sess, "do_orm_execute") |
| 742 | def two(ctx): |
| 743 | ctx.update_execution_options(two=True) |
| 744 | |
| 745 | @event.listens_for(sess, "do_orm_execute") |
| 746 | def three(ctx): |
| 747 | ctx.update_execution_options(three=True) |
| 748 | |
| 749 | @event.listens_for(sess, "do_orm_execute") |
| 750 | def four(ctx): |
| 751 | ctx.update_execution_options(four=True) |
| 752 | |
| 753 | result = sess.execute(select(literal_column("1"))) |
| 754 | |
| 755 | eq_( |
| 756 | result.context.execution_options, |
| 757 | { |
| 758 | "four": True, |
| 759 | "one": True, |
| 760 | "three": True, |
| 761 | "two": True, |
| 762 | }, |
| 763 | ) |
| 764 | |
| 765 | def _flag_fixture(self, session): |
| 766 | canary = Mock() |
nothing calls this directly
no test coverage detected