summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAge
* Merge pull request #380 from dalf/fix-339Alexandre Flament2021-10-12
|\ | | | | [fix] interface language zh_CN and zh_TW don't work
| * [mod] locale: use hyphen everywhere except for BabelAlexandre Flament2021-10-12
| |
| * [fix] fix match_language issue to make zh-TW match to zh-Hant-TWMarc Abonce Seguin2021-10-12
| | | | | | | | | | pybabel separates locales with underscores but we use hyphens everywhere babel doesn't directly touch
* | [enh] verify that Tor proxy works every time searx startsAlexandre Flament2021-10-12
|/ | | | based on @MarcAbonce commit on searx
* plugins: refactor initializationAlexandre Flament2021-10-06
| | | | | | | add a new function "init" call when the app starts. The function can: * return False to disable the plugin. * modify the Flask app.
* Merge pull request #375 from dalf/searxng_extraAlexandre Flament2021-10-03
|\ | | | | SearXNG: searx_extra
| * SearXNG: searxng_extraAlexandre Flament2021-10-02
| |
* | SearXNG: SEARXNG_SETTINGS_PATHAlexandre Flament2021-10-02
| |
* | SearXNG: environment variablesAlexandre Flament2021-10-02
|/
* SearXNG: oscar themeAlexandre Flament2021-09-30
|
* [pylint] fix global-variable-not-assigned issuesMarkus Heiser2021-09-17
| | | | | | | | | | | | | | | | | | | 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>
* Merge pull request #297 from dalf/engine-logger-enhAlexandre Flament2021-09-14
|\ | | | | debug mode: more readable logging
| * [mod] debug mode: use coloredlogs packageAlexandre Flament2021-09-10
| | | | | | | | | | in debug mode, add some padding to make the output more readable in procution mode, add the timestamp
* | [fix] settings - displayed name is SearXNGMarkus Heiser2021-09-13
|/ | | | Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
* [mod] remove remaining references to locales in settings.ymlAlexandre Flament2021-09-02
| | | | see #247
* [mod] move searx/testing.py to the tests directoryAlexandre Flament2021-09-02
| | | | | move robot tests to tests.robot manage calls "python -m tests.robot"
* [pylint] Pylint 2.10 - fix redundant-u-string-prefixMarkus Heiser2021-08-31
| | | | | | | | | | | | 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>
* [mod] searx.webapp.get_locale: read locale from the preferencesAlexandre Flament2021-08-17
| | | | pre_request already set the locale.
* [mod] settings.yml: remove localesAlexandre Flament2021-08-03
| | | | There are detected from the searx/translations directory
* [mod] use tests/unit/settings/test_settings.yml in unit testsMarkus Heiser2021-07-25
| | | | | | | | | | | | | | | 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>
* [mod] oscar theme /preferences: reorganize the preferencesAlexandre Flament2021-06-17
| | | | close #115
* [yamllint] tests/unit/settings/user_settings_remove2.ymlMarkus Heiser2021-06-05
| | | | | | | | Fixed messages reported by:: make test.yamllint Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
* [yamllint] tests/unit/settings/user_settings_remove.ymlMarkus Heiser2021-06-05
| | | | | | | | Fixed messages reported by:: make test.yamllint Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
* [yamllint] tests/unit/settings/user_settings_simple.ymlMarkus Heiser2021-06-05
| | | | | | | | Fixed messages reported by:: make test.yamllint Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
* [yamllint] tests/unit/settings/user_settings_keep_only.ymlMarkus Heiser2021-06-05
| | | | | | | | Fixed messages reported by:: make test.yamllint Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
* [yamllint] tests/unit/settings/user_settings.ymlMarkus Heiser2021-06-05
| | | | | | | | Fixed messages reported by:: make test.yamllint Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
* [yamllint] tests/unit/settings/syntaxerror_settings.ymlMarkus Heiser2021-06-05
| | | | | | | | Fixed messages reported by:: make test.yamllint Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
* [mod] settings_default: remove searx.search.max_request_timeout global variableAlexandre Flament2021-06-01
|
* [fix] unit test: don't load /etc/searx/settings.ymlAlexandre Flament2021-05-18
| | | | | | | | | Add a new environment variable SEARX_DISABLE_ETC_SETTINGS to disable loading of /etc/searx/settings.yml unit tests: * set SEARX_DISABLE_ETC_SETTINGS to 1 * remove SEARX_SETTINGS_PATH if it exists
* [fix] fix KeyError: 'ipv6'Alexandre Flament2021-05-07
| | | | | | | | 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()
* [mod] multithreading only in searx.search.* packagesAlexandre Flament2021-05-05
| | | | | | | | | 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
* [brand] searxng is a fork from searxMarkus Heiser2021-04-25
| | | | Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
* [httpx] replace searx.poolrequests by searx.networkAlexandre Flament2021-04-12
| | | | | | | | | | | | | | | | | | 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)
* [enh] replace requests by httpxAlexandre Flament2021-04-10
|
* [fix] test: avoid HTTP requestsAlexandre Flament2021-04-10
| | | | | patch engine initialization to skip HTTP request (engine_init function in searx.engines.initialize_engines)
* [enh] add ability to send engine data to subsequent requestsAdam Tauber2021-03-06
|
* Merge pull request #2600 from dalf/searx-extraAlexandre Flament2021-03-05
|\ | | | | Add searx_extra package
| * Add searx_extra packageAlexandre Flament2021-03-04
| | | | | | | | | | | | Split the utils directory into: * searx_extra contains update scripts, standalone_searx.py * utils contains the files to build and setup searx.
* | [enh] autocomplete refactoring, autocomplete on external bangsAlexandre Flament2021-03-01
|/
* [mod] add utils/fetch_external_bangs.pyAlexandre Flament2021-02-24
| | | | | Based on duckduckgo bangs Store bangs on a trie to allow autocomplete (not in this commit)
* Updated webutils.highlight_content to ignore double-quotes when highlighting ↵Daniel Hones2021-02-08
| | | | query parts
* [fix] get correct locale with country from browserMarc Abonce Seguin2021-02-04
| | | | | | | | | | | | | | 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.
* fix empty colon in query from selecting ChineseMarc Abonce Seguin2021-01-09
|
* [mod] searx.search.EngineRef: remove from_bang parameterAlexandre Flament2020-12-18
| | | | | | | | | | 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.
* [mod] searx.search.SearchQuery: remove categories parameterAlexandre Flament2020-12-18
| | | | | | | The categories parameter is useless in the constructor: it is always the categories from the EngineRef. The categories becomes a property.
* [mod] split searx.search into different processorsAlexandre Flament2020-12-17
| | | | | | | | 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.
* [mod] themes: remove legacy, courgette and pix-art themesAlexandre Flament2020-12-17
|
* [fix] settings_loader: don't crash when a key exists only in the user settingsAlexandre Flament2020-12-03
| | | | | typical use case: result_proxy can be defined in the user settings, but are not defined the default settings.yml
* [enh] record details exception per engineAlexandre Flament2020-12-03
| | | | add an new API /stats/errors
* [mod] pylint: numerous minor code fixesAlexandre Flament2020-12-01
|