Exemplo n.º 1
0
 def test_piece_line(self):
     line = "Received [BT_PIECE data for piece #74:16384->32767] message . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . TorrentDLM: 'test_original.iso'; Peer: L: 255.255.255.255:0000 [Vuze 5.7.0.0]"
     self.assertTrue(fairness.is_piece_line(line))
Exemplo n.º 2
0
 def test_not_piece_line(self):
     line = "Received [BT_BITFIELD] message . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .TorrentDLM: 'test_original.iso'; Peer: L: 255.255.255.255:0000 [Vuze 5.7.0.0]"
     self.assertFalse(fairness.is_piece_line(line))