mirror of
https://github.com/searxng/searxng.git
synced 2025-07-24 21:59:22 +02:00
tests for _fetch_supported_languages in engines
and refactor method to make it testable without making requests
This commit is contained in:
parent
e0c270bd72
commit
af35eee10b
27 changed files with 387 additions and 3388 deletions
|
@ -4,7 +4,7 @@ from re import compile, sub
|
|||
from lxml import html
|
||||
from searx.utils import html_to_text
|
||||
from searx.engines.xpath import extract_text
|
||||
from searx.engines.duckduckgo import fetch_supported_languages
|
||||
from searx.engines.duckduckgo import _fetch_supported_languages, supported_languages_url
|
||||
|
||||
url = 'https://api.duckduckgo.com/'\
|
||||
+ '?{query}&format=json&pretty=0&no_redirect=1&d=1'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue