def test_sweep_completed_conversations(self): conversation_one = StubConversation(12344) conversation_one.state = tftp_conversation.COMPLETED conversation_two = StubConversation(12345) conversation_two.state = tftp_conversation.READING conversation_three = StubConversation(12346) conversation_three.state = tftp_conversation.COMPLETED table = ConversationTable() table.conversation_table = { ("10.26.0.1", "3942"): conversation_one, ("10.26.0.2", "3942"): conversation_two, ("10.26.0.3", "3942"): conversation_three } performer = Performer(self.sock, table, 10, 6) performer.sweep_completed_conversations() self.assertEqual(table.conversation_table, {("10.26.0.2", "3942"): conversation_two, })
def test_sweep_completed_conversations(self): conversation_one = StubConversation(12344) conversation_one.state = tftp_conversation.COMPLETED conversation_two = StubConversation(12345) conversation_two.state = tftp_conversation.READING conversation_three = StubConversation(12346) conversation_three.state = tftp_conversation.COMPLETED table = ConversationTable() table.conversation_table = { ("10.26.0.1", "3942"): conversation_one, ("10.26.0.2", "3942"): conversation_two, ("10.26.0.3", "3942"): conversation_three } performer = Performer(self.sock, table, 10, 6) performer.sweep_completed_conversations() self.assertEqual(table.conversation_table, { ("10.26.0.2", "3942"): conversation_two, })