2015-08-30 08:09:51 +02:00
|
|
|
#!/usr/bin/env python3
|
|
|
|
import unittest
|
|
|
|
import pirate.local
|
|
|
|
import os
|
|
|
|
|
2015-09-04 05:35:12 +02:00
|
|
|
from tests import util
|
|
|
|
|
|
|
|
|
2015-08-30 08:09:51 +02:00
|
|
|
class TestLocal(unittest.TestCase):
|
|
|
|
|
|
|
|
def test_rich_xml(self):
|
2015-09-04 05:35:12 +02:00
|
|
|
path = util.data_path('rich.xml')
|
2015-08-30 08:09:51 +02:00
|
|
|
expected = [['magnet:?xt=urn:btih:b03c8641415d3a0fc7077f5bf567634442989a74&dn=High.Chaparall.S02E02.PDTV.XViD.SWEDiSH-HuBBaTiX', '?', '?']]
|
|
|
|
actual = pirate.local.search(path, ('High',))
|
|
|
|
self.assertEqual(actual, expected)
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
unittest.main()
|