Skip to content
This repository has been archived by the owner on Sep 7, 2023. It is now read-only.

Commit

Permalink
fix after rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
kvch committed Jan 7, 2019
1 parent b63d645 commit 97351a2
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
2 changes: 1 addition & 1 deletion searx/engines/wikipedia.py
Expand Up @@ -32,7 +32,7 @@
# set language in base_url
def url_lang(lang):
lang_pre = lang.split('-')[0]
if lang_pre == 'all' or lang_pre not in supported_languages:
if lang_pre == 'all' or lang_pre not in supported_languages and lang_pre not in language_aliases:
return 'en'
return match_language(lang, supported_languages, language_aliases).split('-')[0]

Expand Down
3 changes: 0 additions & 3 deletions tests/unit/engines/test_wikipedia.py
Expand Up @@ -26,15 +26,12 @@ def test_request(self):
self.assertIn('Test_Query', params['url'])
self.assertNotIn('test_query', params['url'])

<<<<<<< HEAD
dicto['language'] = 'nb'
params = wikipedia.request(query, dicto)
self.assertIn('no.wikipedia.org', params['url'])
=======
dicto['language'] = 'all'
params = wikipedia.request(query, dicto)
self.assertIn('en', params['url'])
>>>>>>> Revert "remove 'all' option from search languages"

dicto['language'] = 'xx'
params = wikipedia.request(query, dicto)
Expand Down

0 comments on commit 97351a2

Please sign in to comment.