(self, session, expect_mapped_bind=True)
| 7619 | |
| 7620 | @contextlib.contextmanager |
| 7621 | def _assert_bind_args(self, session, expect_mapped_bind=True): |
| 7622 | get_bind = mock.Mock(side_effect=session.get_bind) |
| 7623 | with mock.patch.object(session, "get_bind", get_bind): |
| 7624 | yield |
| 7625 | for call_ in get_bind.mock_calls: |
| 7626 | if expect_mapped_bind: |
| 7627 | eq_( |
| 7628 | call_, |
| 7629 | mock.call( |
| 7630 | clause=mock.ANY, mapper=inspect(self.classes.User) |
| 7631 | ), |
| 7632 | ) |
| 7633 | else: |
| 7634 | eq_(call_, mock.call(clause=mock.ANY)) |
| 7635 | |
| 7636 | def test_single_entity_q(self): |
| 7637 | User = self.classes.User |
no test coverage detected