def test_post_send_with_resumption(self): fg = FinishedGenerator() state = ConnectionState() state.resuming = True ret = fg.generate(state) fg.post_send(state) self.assertFalse(state.resuming)
def test_post_send(self): fg = FinishedGenerator() state = ConnectionState() ret = fg.generate(state) self.assertNotIn(ret, state.handshake_messages) fg.post_send(state) self.assertIn(ret, state.handshake_messages)