Merge branch 'master' into update_data_update_firefox_version.py

This commit is contained in:
Noémi Ványi 2022-04-13 21:01:29 +02:00 committed by GitHub
commit 0dbd21e31c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 5 deletions

View File

@ -1,8 +1,8 @@
certifi==2021.10.8
babel==2.9.1
flask-babel==2.0.0
flask==2.0.2
jinja2==3.0.3
flask==2.1.1
jinja2==3.1.1
lxml==4.7.1
pygments==2.8.0
python-dateutil==2.8.2

View File

@ -143,7 +143,7 @@ def response(resp):
'title': title,
'content': content})
for suggestion in eval_xpath_list(dom, '//div[contains(@class, "AlsoTry")]'):
for suggestion in eval_xpath_list(dom, '//div[contains(@class, "AlsoTry")]//table//a'):
# append suggestion
results.append({'suggestion': extract_text(suggestion)})

View File

@ -90,12 +90,12 @@ class ViewsTestCase(SearxTestCase):
def test_index_html_post(self):
result = self.app.post('/', data={'q': 'test'})
self.assertEqual(result.status_code, 308)
self.assertEqual(result.location, 'http://localhost/search')
self.assertEqual(result.location, '/search')
def test_index_html_get(self):
result = self.app.post('/?q=test')
self.assertEqual(result.status_code, 308)
self.assertEqual(result.location, 'http://localhost/search?q=test')
self.assertEqual(result.location, '/search?q=test')
def test_search_empty_html(self):
result = self.app.post('/search', data={'q': ''})