Test to check the prepare flag is properly set, This should only happen for V5 at the moment. @since 3.9 @jira_ticket PYTHON-694, PYTHON-713 @expected_result the values are correctly written @test_category connection
(self)
| 132 | self.assertEqual(uint32_unpack(io.write.mock_calls[5][1][0]), max_pages_per_second) |
| 133 | |
| 134 | def test_prepare_flag(self): |
| 135 | """ |
| 136 | Test to check the prepare flag is properly set, This should only happen for V5 at the moment. |
| 137 | |
| 138 | @since 3.9 |
| 139 | @jira_ticket PYTHON-694, PYTHON-713 |
| 140 | @expected_result the values are correctly written |
| 141 | |
| 142 | @test_category connection |
| 143 | """ |
| 144 | message = PrepareMessage("a") |
| 145 | io = Mock() |
| 146 | for version in ProtocolVersion.SUPPORTED_VERSIONS: |
| 147 | message.send_body(io, version) |
| 148 | if ProtocolVersion.uses_prepare_flags(version): |
| 149 | self.assertEqual(len(io.write.mock_calls), 3) |
| 150 | else: |
| 151 | self.assertEqual(len(io.write.mock_calls), 2) |
| 152 | io.reset_mock() |
| 153 | |
| 154 | def test_prepare_flag_with_keyspace(self): |
| 155 | message = PrepareMessage("a", keyspace='ks') |
nothing calls this directly
no test coverage detected