mirror of
https://github.com/searxng/searxng.git
synced 2025-09-10 12:18:24 +02:00
tests for language support in engines
This commit is contained in:
parent
1b46ecd21a
commit
e0c270bd72
9 changed files with 54 additions and 5 deletions
|
@ -10,6 +10,7 @@ class TestSubtitleseekerEngine(SearxTestCase):
|
|||
query = 'test_query'
|
||||
dicto = defaultdict(dict)
|
||||
dicto['pageno'] = 1
|
||||
dicto['language'] = 'fr-FR'
|
||||
params = subtitleseeker.request(query, dicto)
|
||||
self.assertTrue('url' in params)
|
||||
self.assertTrue(query in params['url'])
|
||||
|
@ -68,6 +69,10 @@ class TestSubtitleseekerEngine(SearxTestCase):
|
|||
self.assertIn('1039 Subs', results[0]['content'])
|
||||
self.assertIn('Alternative Title', results[0]['content'])
|
||||
|
||||
dicto['language'] = 'pt-BR'
|
||||
results = subtitleseeker.response(response)
|
||||
self.assertEqual(results[0]['url'], 'http://this.is.the.url/Brazilian/')
|
||||
|
||||
html = """
|
||||
<div class="boxRows">
|
||||
<div class="boxRowsInner" style="width:600px;">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue