示例#1
0
    def test_udp(self):
        torrent = Torrent('torrents/archlinux-2013.12.01-dual.iso.torrent')
        tracker = Tracker('udp://tracker.openbittorrent.com:80/announce', torrent)

        response = yield tracker.announce(utils.peer_id(), 6881)

        self.assertIsInstance(response, TrackerResponse)
示例#2
0
    def test_http(self):
        torrent = Torrent('torrents/archlinux-2013.12.01-dual.iso.torrent')
        tracker = Tracker('http://tracker.archlinux.org:6969/announce', torrent)

        response = yield tracker.announce(utils.peer_id(), 6881)

        self.assertIsInstance(response, TrackerResponse)