Exemple #1
0
    def test_bytestag_hash(self):
        uri = MagnetURI.parse(
            'magnet:?xt=urn:bstagih:3I42H3S6NNFQ2MSVX7XZKYAYSCX5QBYJ')

        self.assertEqual(uri.bytestag_info_hash, KeyBytes(
            '3I42H3S6NNFQ2MSVX7XZKYAYSCX5QBYJ'))
Exemple #2
0
    def test_exact_target(self):
        uri = MagnetURI.parse('magnet:?xt=abcd')

        self.assertEqual(uri.exact_topic, 'abcd')
Exemple #3
0
    def test_bittorrent_hash(self):
        uri = MagnetURI.parse(
            'magnet:?xt=urn:btih:DA39A3EE5E6B4B0D3255BFEF95601890AFD80709')

        self.assertEqual(uri.bittorrent_info_hash, KeyBytes(
            'DA39A3EE5E6B4B0D3255BFEF95601890AFD80709'))