summaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2022-01-17[typing] add results.TimingMartin Fischer
2022-01-12[fix] external bangs: don't overwrite Bangs in data trieMarkus Heiser
Bangs with a `*` suffix (e.g. `!!d*`) overwrite Bangs with the same prefix (e.g. `!!d`) [1]. This can be avoid when a non printable character is used to tag a LEAF_KEY. [1] https://github.com/searxng/searxng/pull/740#issuecomment-1010411888 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-01-07Merge pull request #708 from not-my-profile/pref-refactorMartin Fischer
Refactor `preferences`
2022-01-06[refactor] refactor SwitchableSettingMartin Fischer
The previous implementation used two hash sets and a list. ... that's not necessary ... a single hash map suffices. And it's also less error prone ... because the previous data structure allowed a setting to be enabled and disabled at the same time.
2022-01-06[refactor] add type hints & remove Setting._post_initMartin Fischer
Previously the Setting classes used a horrible _post_init hack that prevented proper type checking.
2022-01-06[fix] remove broken ? search operatorMartin Fischer
The ? search operator has been broken for some time and currently only raises the question why it's still there. ## Context ## The query "Paris !images" searches for "Paris" in the "images" category. Once upon a time Searx supported "Paris ?images" to search for "Paris" in the currently enabled categories and the "images" category. The feature makes sense ... the ? syntax does not. We will hopefully introduce a +!images syntax in the future. Fixes #702.
2022-01-06Merge pull request #634 from not-my-profile/powered-byAlexandre Flament
Introduce `categories_as_tabs` & group engines in tabs
2022-01-05Merge pull request #596 from dalf/upgrade-httpxAlexandre Flament
Upgrade httpx
2022-01-05[mod] upgrade httpx 0.21.2Alexandre Flament
httpx 0.21.2 and httpcore 0.14.4 fix multiple issues: * https://github.com/encode/httpx/releases/tag/0.21.2 * https://github.com/encode/httpcore/releases/tag/0.14.4 so most of the workarounds in searx.network have been removed.
2022-01-05[enh] change categories_as_tabs from a list to a dictMartin Fischer
The tab icon names are currently hard coded in the templates. This commit lets us introduce an icon property in the future, e.g: categories_as_tabs: general: icon: search-outline
2022-01-03[enh] introduce categories_as_tabsMartin Fischer
Previously all categories were displayed as search engine tabs. This commit changes that so that only the categories listed under categories_as_tabs in settings.yml are displayed. This lets us introduce more categories without cluttering up the UI. Categories not displayed as tabs can still be searched with !bangs.
2022-01-02reference docs.searxng.orgAlexandre Flament
2021-12-28[mod] webutils.py: remove dead codeAlexandre Flament
secret_key can't be bytes (see settings_default.py)
2021-12-27[fix] issues reported by pylintMarkus Heiser
Fix pylint issues from commit (3d96a983) [format.python] initial formatting of the python code Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-12-27[format.python] initial formatting of the python codeMarkus Heiser
This patch was generated by black [1]:: make format.python [1] https://github.com/psf/black Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-12-27[format.python] disable py code formatting for some hunks of codeMarkus Heiser
Disable the python code formatting from python-black, where the readability of code suffers by formatting. Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-11-26[fix] oscar theme: use SearXNG logo and wordmarkMarkus Heiser
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-10-29healthcheck endpointIgor Rzegocki
2021-10-12Merge pull request #380 from dalf/fix-339Alexandre Flament
[fix] interface language zh_CN and zh_TW don't work
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-10-02SearXNG: environment variablesAlexandre 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-14Merge pull request #297 from dalf/engine-logger-enhAlexandre Flament
debug mode: more readable logging
2021-09-13[fix] settings - displayed name is SearXNGMarkus Heiser
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-09-10[mod] debug mode: use coloredlogs packageAlexandre Flament
in debug mode, add some padding to make the output more readable in procution mode, add the timestamp
2021-09-02[mod] remove remaining references to locales in settings.ymlAlexandre Flament
see #247
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-17[mod] oscar theme /preferences: reorganize the preferencesAlexandre Flament
close #115
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-18[fix] unit test: don't load /etc/searx/settings.ymlAlexandre Flament
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
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>