def test_emptyingTheMessageQueueWaitsForAWhile(messageTransport): t = messageTransport t.write('hi') t._clock.pump([1, 10]) t._parseMessage(t._now(), Message(0, 1, [halfOpen(0, 2)], None, 0, '').pack()) t._clock.advance(10) assert len(t._sendMessage.captured) == 2 assert nextCallIn(t._clock) == 60
def test_emptyMessageQueueWaitsForAWhile(messageTransport): t = messageTransport t._clock.advance(1) assert nextCallIn(t._clock) == 60