diff options
author | misnyo <misnyo@misnyo.eu> | 2017-08-25 00:52:35 +0200 |
---|---|---|
committer | misnyo <misnyo@misnyo.eu> | 2017-08-25 00:52:35 +0200 |
commit | d14e2781b28e77207ab841dd52db0835ee55fcf2 (patch) | |
tree | 2973584462a9f445eb924016b3c5fb9d2d931934 /tests | |
parent | 700baf2178d5970cef7cd1efaf24522a458a6b55 (diff) | |
download | searxng-d14e2781b28e77207ab841dd52db0835ee55fcf2.tar.gz searxng-d14e2781b28e77207ab841dd52db0835ee55fcf2.zip |
[fix]torrentz search engine fixed for new version
Diffstat (limited to 'tests')
-rw-r--r-- | tests/unit/engines/test_torrentz.py | 32 |
1 files changed, 14 insertions, 18 deletions
diff --git a/tests/unit/engines/test_torrentz.py b/tests/unit/engines/test_torrentz.py index 2f836f73e..06c6fa30c 100644 --- a/tests/unit/engines/test_torrentz.py +++ b/tests/unit/engines/test_torrentz.py @@ -14,7 +14,7 @@ class TestTorrentzEngine(SearxTestCase): params = torrentz.request(query, dic) self.assertTrue('url' in params) self.assertTrue(query in params['url']) - self.assertTrue('torrentz.eu' in params['url']) + self.assertTrue('torrentz2.eu' in params['url']) def test_response(self): resp = mock.Mock(text='<html></html>') @@ -30,13 +30,11 @@ class TestTorrentzEngine(SearxTestCase): books ebooks </dt> <dd> - <span class="v">1</span> - <span class="a"> - <span title="Sun, 22 Nov 2015 03:01:42">4 months</span> - </span> - <span class="s">30 MB</span> - <span class="u">14</span> - <span class="d">1</span> + <span>1</span> + <span title="1503595924">5 hours</span> + <span>30 MB</span> + <span>14</span> + <span>1</span> </dd> </dl> @@ -48,13 +46,11 @@ class TestTorrentzEngine(SearxTestCase): books ebooks </dt> <dd> - <span class="v">1</span> - <span class="a"> - <span title="Sun, 2124091j0j190gm42">4 months</span> - </span> - <span class="s">30MB</span> - <span class="u">5,555</span> - <span class="d">1,234,567</span> + <span>1</span> + <span title="1503595924 aaa">5 hours</span> + <span>30MB</span> + <span>5,555</span> + <span>1,234,567</span> </dd> </dl> </div> @@ -68,10 +64,10 @@ class TestTorrentzEngine(SearxTestCase): # testing against the first result r = results[0] - self.assertEqual(r['url'], 'https://torrentz.eu/4362e08b1d80e1820fb2550b752f9f3126fe76d6') + self.assertEqual(r['url'], 'https://torrentz2.eu/4362e08b1d80e1820fb2550b752f9f3126fe76d6') self.assertEqual(r['title'], 'Completely valid info books ebooks') # 22 Nov 2015 03:01:42 - self.assertEqual(r['publishedDate'], datetime(2015, 11, 22, 3, 1, 42)) + self.assertEqual(r['publishedDate'], datetime(2017, 8, 24, 19, 32, 4)) self.assertEqual(r['seed'], 14) self.assertEqual(r['leech'], 1) self.assertEqual(r['filesize'], 30 * 1024 * 1024) @@ -79,7 +75,7 @@ class TestTorrentzEngine(SearxTestCase): # testing against the second result r = results[1] - self.assertEqual(r['url'], 'https://torrentz.eu/poaskdpokaspod') + self.assertEqual(r['url'], 'https://torrentz2.eu/poaskdpokaspod') self.assertEqual(r['title'], 'Invalid hash and date and filesize books ebooks') self.assertEqual(r['seed'], 5555) self.assertEqual(r['leech'], 1234567) |