(self, session, expect_mapped_bind=True)
| 7094 | |
| 7095 | @contextlib.contextmanager |
| 7096 | def _assert_bind_args(self, session, expect_mapped_bind=True): |
| 7097 | get_bind = mock.Mock(side_effect=session.get_bind) |
| 7098 | with mock.patch.object(session, "get_bind", get_bind): |
| 7099 | yield |
| 7100 | for call_ in get_bind.mock_calls: |
| 7101 | if expect_mapped_bind: |
| 7102 | eq_( |
| 7103 | call_, |
| 7104 | mock.call( |
| 7105 | clause=mock.ANY, mapper=inspect(self.classes.User) |
| 7106 | ), |
| 7107 | ) |
| 7108 | else: |
| 7109 | eq_(call_, mock.call(clause=mock.ANY)) |
| 7110 | |
| 7111 | def test_single_entity_q(self): |
| 7112 | User = self.classes.User |
no test coverage detected