예제 #1
0
    def test_expanded_list(self):
        """ Test that an expanded list is dispatched correctly. """

        self.p = torrent.get_peers( \
         [{'ip': '100.100.100.100', 'peer id': 'test1', \
          'port': 1000}])
        self.assertEqual(self.p, [("100.100.100.100", 1000)])
예제 #2
0
	def test_expanded_list(self):
		""" Test that an expanded list is dispatched correctly. """

		self.p = torrent.get_peers( \
			[{'ip': '100.100.100.100', 'peer id': 'test1', \
				'port': 1000}])
		self.assertEqual(self.p, [("100.100.100.100", 1000)])
예제 #3
0
    def test_binary_list(self):
        """ Test that a binary list is dispatched correctly. """

        self.p = torrent.get_peers("dddd\x03\xe8")
        self.assertEqual(self.p, [("100.100.100.100", 1000)])
예제 #4
0
	def test_binary_list(self):
		""" Test that a binary list is dispatched correctly. """

		self.p = torrent.get_peers("dddd\x03\xe8")
		self.assertEqual(self.p, [("100.100.100.100", 1000)])