Test to check the appropriate calls are made @since 3.9 @jira_ticket PYTHON-713 @expected_result the values are correctly written @test_category connection
(self)
| 70 | (b'\x00\x00\x00\x01',), (b'\x00\x00',)]) |
| 71 | |
| 72 | def test_query_message(self): |
| 73 | """ |
| 74 | Test to check the appropriate calls are made |
| 75 | |
| 76 | @since 3.9 |
| 77 | @jira_ticket PYTHON-713 |
| 78 | @expected_result the values are correctly written |
| 79 | |
| 80 | @test_category connection |
| 81 | """ |
| 82 | message = QueryMessage("a", 3) |
| 83 | io = Mock() |
| 84 | |
| 85 | message.send_body(io, 4) |
| 86 | self._check_calls(io, [(b'\x00\x00\x00\x01',), (b'a',), (b'\x00\x03',), (b'\x00',)]) |
| 87 | |
| 88 | io.reset_mock() |
| 89 | message.send_body(io, 5) |
| 90 | self._check_calls(io, [(b'\x00\x00\x00\x01',), (b'a',), (b'\x00\x03',), (b'\x00\x00\x00\x00',)]) |
| 91 | |
| 92 | def _check_calls(self, io, expected): |
| 93 | self.assertEqual( |
nothing calls this directly
no test coverage detected