summaryrefslogtreecommitdiff
path: root/tests/unit
AgeCommit message (Collapse)Author
2021-10-12[mod] locale: use hyphen everywhere except for BabelAlexandre Flament
2021-10-12[fix] fix match_language issue to make zh-TW match to zh-Hant-TWMarc Abonce Seguin
pybabel separates locales with underscores but we use hyphens everywhere babel doesn't directly touch
2021-10-12[enh] verify that Tor proxy works every time searx startsAlexandre Flament
based on @MarcAbonce commit on searx
2021-10-06plugins: refactor initializationAlexandre Flament
add a new function "init" call when the app starts. The function can: * return False to disable the plugin. * modify the Flask app.
2021-10-03Merge pull request #375 from dalf/searxng_extraAlexandre Flament
SearXNG: searx_extra
2021-10-02SearXNG: searxng_extraAlexandre Flament
2021-10-02SearXNG: SEARXNG_SETTINGS_PATHAlexandre Flament
2021-09-30SearXNG: oscar themeAlexandre Flament
2021-09-17[pylint] fix global-variable-not-assigned issuesMarkus Heiser
If there is no write access, there is no need for global. Remove global statement if there is no assignment. global-variable-not-assigned: Using global for names but no assignment is done Used when a variable is defined through the "global" statement but no assignment to this variable is done. In Pylint 2.11 the global-variable-not-assigned checker now catches global variables that are never reassigned in a local scope and catches (reassigned) functions [1][2] [1] https://pylint.pycqa.org/en/latest/whatsnew/2.11.html [2] https://github.com/PyCQA/pylint/issues/1375 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-09-13[fix] settings - displayed name is SearXNGMarkus Heiser
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-09-02[mod] move searx/testing.py to the tests directoryAlexandre Flament
move robot tests to tests.robot manage calls "python -m tests.robot"
2021-08-31[pylint] Pylint 2.10 - fix redundant-u-string-prefixMarkus Heiser
Pylint 2.10 added new default checks [1]: redundant-u-string-prefix: Emitted when the u prefix is added to a string [1] https://pylint.pycqa.org/en/latest/whatsnew/2.10.html [2] https://github.com/PyCQA/pylint/issues/4102 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-08-17[mod] searx.webapp.get_locale: read locale from the preferencesAlexandre Flament
pre_request already set the locale.
2021-08-03[mod] settings.yml: remove localesAlexandre Flament
There are detected from the searx/translations directory
2021-07-25[mod] use tests/unit/settings/test_settings.yml in unit testsMarkus Heiser
In unit tests settings from searx/settings.yml and the user settings from: unit/settings/test_settings.yml are used. In the latter, settings can be activated that are needed in the unit test but should not activated by default in production. Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-06-05[yamllint] tests/unit/settings/user_settings_remove2.ymlMarkus Heiser
Fixed messages reported by:: make test.yamllint Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-06-05[yamllint] tests/unit/settings/user_settings_remove.ymlMarkus Heiser
Fixed messages reported by:: make test.yamllint Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-06-05[yamllint] tests/unit/settings/user_settings_simple.ymlMarkus Heiser
Fixed messages reported by:: make test.yamllint Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-06-05[yamllint] tests/unit/settings/user_settings_keep_only.ymlMarkus Heiser
Fixed messages reported by:: make test.yamllint Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-06-05[yamllint] tests/unit/settings/user_settings.ymlMarkus Heiser
Fixed messages reported by:: make test.yamllint Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-06-05[yamllint] tests/unit/settings/syntaxerror_settings.ymlMarkus Heiser
Fixed messages reported by:: make test.yamllint Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-06-01[mod] settings_default: remove searx.search.max_request_timeout global variableAlexandre Flament
2021-05-07[fix] fix KeyError: 'ipv6'Alexandre Flament
tests/units/network/test_network.py requires a call to searx.network.network.initialize Depending of the test order execution, this function was sometimes call in another test, sometimes not. This commit ensure there is a call to initialize()
2021-05-05[mod] multithreading only in searx.search.* packagesAlexandre Flament
it prepares the new architecture change, everything about multithreading in moved in the searx.search.* packages previously the call to the "init" function of the engines was done in searx.engines: * the network was not set (request not sent using the defined proxy) * it requires to monkey patch the code to avoid HTTP requests during the tests
2021-04-25[brand] searxng is a fork from searxMarkus Heiser
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-04-12[httpx] replace searx.poolrequests by searx.networkAlexandre Flament
settings.yml: * outgoing.networks: * can contains network definition * propertiers: enable_http, verify, http2, max_connections, max_keepalive_connections, keepalive_expiry, local_addresses, support_ipv4, support_ipv6, proxies, max_redirects, retries * retries: 0 by default, number of times searx retries to send the HTTP request (using different IP & proxy each time) * local_addresses can be "192.168.0.1/24" (it supports IPv6) * support_ipv4 & support_ipv6: both True by default see https://github.com/searx/searx/pull/1034 * each engine can define a "network" section: * either a full network description * either reference an existing network * all HTTP requests of engine use the same HTTP configuration (it was not the case before, see proxy configuration in master)
2021-04-10[enh] replace requests by httpxAlexandre Flament
2021-04-10[fix] test: avoid HTTP requestsAlexandre Flament
patch engine initialization to skip HTTP request (engine_init function in searx.engines.initialize_engines)
2021-03-06[enh] add ability to send engine data to subsequent requestsAdam Tauber
2021-03-05Merge pull request #2600 from dalf/searx-extraAlexandre Flament
Add searx_extra package
2021-03-04Add searx_extra packageAlexandre Flament
Split the utils directory into: * searx_extra contains update scripts, standalone_searx.py * utils contains the files to build and setup searx.
2021-03-01[enh] autocomplete refactoring, autocomplete on external bangsAlexandre Flament
2021-02-24[mod] add utils/fetch_external_bangs.pyAlexandre Flament
Based on duckduckgo bangs Store bangs on a trie to allow autocomplete (not in this commit)
2021-02-08Updated webutils.highlight_content to ignore double-quotes when highlighting ↵Daniel Hones
query parts
2021-02-04[fix] get correct locale with country from browserMarc Abonce Seguin
Some of our interface locales include uppercase country codes, which are separated by `_` instead of the more common `-`. Also, a browser's `Accept-Language` header could be in lowercase. This commit attempts to normalize those cases so a browser's language+country codes can better match with our locales. This solution assumes that our UI locales have nothing more than language and optionally country. If we ever add a script specific locale like `zh-Hant-TW` this would have to change to accomodate that, but the idea would be pretty much the same as this fix.
2021-01-09fix empty colon in query from selecting ChineseMarc Abonce Seguin
2020-12-18[mod] searx.search.EngineRef: remove from_bang parameterAlexandre Flament
from_bang is True when the user query contains a bang. In this case the category is also set to 'none'. from_bang only usage was in searx.webadapter.parse_specific : if from_bang is True, then the EngineRef category is ignored and force to 'none'. This commit also removes the searx.webadapter.parse_sepecific function.
2020-12-18[mod] searx.search.SearchQuery: remove categories parameterAlexandre Flament
The categories parameter is useless in the constructor: it is always the categories from the EngineRef. The categories becomes a property.
2020-12-17[mod] split searx.search into different processorsAlexandre Flament
see searx.search.processors.abstract.EngineProcessor First the method searx call the get_params method. If the return value is not None, then the searx call the method search.
2020-12-17[mod] themes: remove legacy, courgette and pix-art themesAlexandre Flament
2020-12-03[fix] settings_loader: don't crash when a key exists only in the user settingsAlexandre Flament
typical use case: result_proxy can be defined in the user settings, but are not defined the default settings.yml
2020-12-03[enh] record details exception per engineAlexandre Flament
add an new API /stats/errors
2020-12-01[mod] pylint: numerous minor code fixesAlexandre Flament
2020-12-01[fix] tests: fix duplicate method nameAlexandre Flament
2020-11-27[enh] settings.yml: add use_default_settings option (2nd version)Alexandre Flament
2020-11-20[enh] Add multiple outgoing proxiesAlexandre Flament
credits go to @bauruine see https://github.com/searx/searx/pull/1958
2020-11-17[mod] use github actions instead of travisAlexandre Flament
fix https://github.com/searx/searx/issues/2279
2020-11-17[fix] fix a test_standalone_searx test caseAlexandre Flament
If test_engines_init.py runs before test_standalone_searx.py, the engine list is not empty. It makes test_get_search_query flaky. This commit initializes the engline list in test_standalone_searx.py
2020-11-14[mod] remove unused importAlexandre Flament
use from searx.engines.duckduckgo import _fetch_supported_languages, supported_languages_url # NOQA so it is possible to easily remove all unused import using autoflake: autoflake --in-place --recursive --remove-all-unused-imports searx tests
2020-11-14Merge pull request #2296 from rachmadaniHaryono/feature/suppress-outputAlexandre Flament
suppress test output