コード例 #1
0
ファイル: test_bittorrent.py プロジェクト: mausvt/torrent
    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
ファイル: test_bittorrent.py プロジェクト: mausvt/torrent
    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)