mirror of
https://github.com/searxng/searxng.git
synced 2025-08-02 18:12:21 +02:00
Revert "remove 'all' option from search languages"
This reverts commit 4d1770398a
.
This commit is contained in:
parent
491792c1a5
commit
b63d645a52
51 changed files with 245 additions and 70 deletions
|
@ -73,6 +73,42 @@ class TestSubtitleseekerEngine(SearxTestCase):
|
|||
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;">
|
||||
<img src="http://static.subtitleseeker.com/images/movie.gif"
|
||||
style="width:16px; height:16px;" class="icon">
|
||||
<a href="http://this.is.the.url/"
|
||||
class="blue" title="Title subtitle" >
|
||||
This is the Title
|
||||
</a>
|
||||
</div>
|
||||
<div class="boxRowsInner f12b red" style="width:70px;">
|
||||
1998
|
||||
</div>
|
||||
<div class="boxRowsInner grey-web f12" style="width:120px;">
|
||||
<img src="http://static.subtitleseeker.com/images/basket_put.png"
|
||||
style="width:16px; height:16px;" class="icon">
|
||||
1039 Subs
|
||||
</div>
|
||||
<div class="boxRowsInner grey-web f10" style="width:130px;">
|
||||
<img src="http://static.subtitleseeker.com/images/arrow_refresh_small.png"
|
||||
style="width:16px; height:16px;" class="icon">
|
||||
1 hours ago
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
"""
|
||||
dicto['language'] = 'all'
|
||||
response = mock.Mock(text=html, search_params=dicto)
|
||||
results = subtitleseeker.response(response)
|
||||
self.assertEqual(type(results), list)
|
||||
self.assertEqual(len(results), 1)
|
||||
self.assertEqual(results[0]['title'], 'This is the Title')
|
||||
self.assertEqual(results[0]['url'], 'http://this.is.the.url/')
|
||||
self.assertIn('1998', results[0]['content'])
|
||||
self.assertIn('1039 Subs', results[0]['content'])
|
||||
|
||||
html = """
|
||||
<div class="boxRows">
|
||||
<div class="boxRowsInner" style="width:600px;">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue