mirror of
https://github.com/searxng/searxng.git
synced 2024-11-19 19:00:10 +01:00
follow up tests
This commit is contained in:
parent
16915116e0
commit
7fd7bd75ff
@ -15,7 +15,7 @@ class TestPiratebayEngine(SearxTestCase):
|
||||
params = piratebay.request(query, dicto)
|
||||
self.assertIn('url', params)
|
||||
self.assertIn(query, params['url'])
|
||||
self.assertIn('piratebay.se', params['url'])
|
||||
self.assertIn('piratebay.org', params['url'])
|
||||
self.assertIn('0', params['url'])
|
||||
|
||||
dicto['category'] = 'music'
|
||||
@ -99,7 +99,7 @@ class TestPiratebayEngine(SearxTestCase):
|
||||
self.assertEqual(type(results), list)
|
||||
self.assertEqual(len(results), 2)
|
||||
self.assertEqual(results[0]['title'], 'This is the title')
|
||||
self.assertEqual(results[0]['url'], 'https://thepiratebay.se/this.is.the.link')
|
||||
self.assertEqual(results[0]['url'], 'https://thepiratebay.org/this.is.the.link')
|
||||
self.assertEqual(results[0]['content'], 'This is the content and should be OK')
|
||||
self.assertEqual(results[0]['seed'], 13)
|
||||
self.assertEqual(results[0]['leech'], 334)
|
||||
@ -149,7 +149,7 @@ class TestPiratebayEngine(SearxTestCase):
|
||||
self.assertEqual(type(results), list)
|
||||
self.assertEqual(len(results), 1)
|
||||
self.assertEqual(results[0]['title'], 'This is the title')
|
||||
self.assertEqual(results[0]['url'], 'https://thepiratebay.se/this.is.the.link')
|
||||
self.assertEqual(results[0]['url'], 'https://thepiratebay.org/this.is.the.link')
|
||||
self.assertEqual(results[0]['content'], 'This is the content and should be OK')
|
||||
self.assertEqual(results[0]['seed'], 0)
|
||||
self.assertEqual(results[0]['leech'], 0)
|
||||
|
Loading…
Reference in New Issue
Block a user