def test_parse_url_with_full_cover(self):
     plugin = RutorOrgPlugin()
     plugin.init(self.tracker_settings)
     urls = ['http://www.notrutor.info/torrent/442959',
             'http://www.rutor.info/not-match-url/442959',
             'http://rutor.info/search/']
     for url in urls:
         self.assertIsNone(plugin.parse_url(url))
 def test_parse_url(self):
     plugin = RutorOrgPlugin()
     plugin.init(self.tracker_settings)
     original_name = u"Время приключений с Финном и Джейком / Adventure Time with Finn & Jake [S01-06] (2010-2015) WEB-DL 720p | Cartoon Network, Зебуро"
     urls = ["http://rutor.info/torrent/466037", "http://www.rutor.info/torrent/466037"]
     for url in urls:
         result = plugin.parse_url(url)
         self.assertIsNotNone(result, "Can't parse url={}".format(url))
         self.assertTrue("original_name" in result, "Can't find original_name for url={}".format(url))
         self.assertEqual(original_name, result["original_name"])
 def test_parse_url(self):
     plugin = RutorOrgPlugin()
     plugin.init(self.tracker_settings)
     original_name = u'Время приключений с Финном и Джейком / Adventure Time with Finn & Jake [S01-06] (2010-2015) WEB-DL 720p | Cartoon Network, Зебуро'
     urls = ['http://rutor.info/torrent/466037',
             'http://www.rutor.info/torrent/466037']
     for url in urls:
         result = plugin.parse_url(url)
         self.assertIsNotNone(result, 'Can\'t parse url={}'.format(url))
         self.assertTrue('original_name' in result, 'Can\'t find original_name for url={}'.format(url))
         self.assertEqual(original_name, result['original_name'])