summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAge
* [theme] peel out oscar from SearXNG developmentMarkus Heiser2022-04-30
| | | | | | This is the first step of removing oscar theme Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
* [fix] dailymotion engine: filter by language & countryMarkus Heiser2022-04-16
| | | | | | | | | | | | | | | | | | - fix the issue of fetching more the 7000 *languages* - improve the request function and filter by language & country - implement time_range_support & safesearch - add more fields to the response from dailymotion (allow_embed, length) - better clean up of HTML tags in the 'content' field. This is more or less a complete rework based on the '/videos' API from [1]. This patch cleans up the language list in SearXNG that has been polluted by the ISO-639-3 2 and 3 letter codes from dailymotion languages which have never been used. [1] https://developers.dailymotion.com/tools/ Closes: https://github.com/searxng/searxng/issues/1065 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
* [fix] add missing territory (country) nameMarkus Heiser2022-04-05
| | | | | Related-to: https://github.com/searxng/searxng/pull/1029#issuecomment-1086824911 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
* [fix] issue when upgrading from werkzeug v2.0.3 to v2.1.0Markus Heiser2022-04-01
| | | | | | | | | | | | | | | | | | | | | | | In v2.1.0 werkzeug [1] fixed an issue [2] to keep relative redirect locations by default [3]. Since relative locations are returned, we need to fix out test cases to avoid AssertionErrors like this one:: ====================================================================== FAIL: test_index_html_get (tests.unit.test_webapp.ViewsTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/runner/work/searxng/searxng/tests/unit/test_webapp.py", line 105, in test_index_html_get self.assertEqual(result.location, 'http://localhost/search?q=test') AssertionError: '/search?q=test' != 'http://localhost/search?q=test' - /search?q=test + http://localhost/search?q=test [1] https://werkzeug.palletsprojects.com/ [2] https://github.com/pallets/werkzeug/issues/2352 fixed in [3] https://github.com/pallets/werkzeug/pull/2354 Related-to: https://github.com/searxng/searxng/pull/1039#issuecomment-1085538288 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
* Merge pull request #894 from dalf/simple-aria-1Alexandre Flament2022-03-19
|\ | | | | [enh] simple: basic ARIA fixes
| * [enh] simple: basic ARIA fixesAlexandre Flament2022-03-08
| |
* | [mod] replace /help by /info pages and include pages in project docsMarkus Heiser2022-03-12
|/ | | | | | | | | | | | | | | | | This patch implements a bolierplate to share content from info-pages of the SearXNG instance (URL /info) with the project documentation (path /docs/user). The info pages are using Markdown (CommonMark), to include them in the project documentation (reST) the myst-parser [1] is used in the Sphinx-doc build chain. If base_url is known (defined in settings.yml) links to the instance are also inserted into the project documentation:: searxng_extra/docs_prebuild [1] https://www.sphinx-doc.org/en/master/usage/markdown.html Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
* [mod] URL for the static file contains the sha1Alexandre Flament2022-03-05
| | | | | * allow to cache the static file forever * avoid bugs when the static files are updated but not reloaded
* [simple theme] replace Image_layout.js with flexbox CS impl.mrpaulblack2022-02-26
| | | | | | | | | | | | | | * drop image_layout.js from simple theme * move image_layout.js to oscar theme and delete common js dir (since its empty now) * align top position of image detail modal with bottom position of search header * use flexbox to display images; row height can be set via @results-image-row-height in defenitions.less * display span title underneath each image with a max width of 12rem * increase margin and padding around image article on desktop and tablet * make article height smaller on phone layout (height of 6rem) to display more content on current view * remove content from result, if the title and content matches * use a group that cotains the flex image article, if images are mixed with other categories * fix pylint issues in webapp.py * use the default.html result template in unit tests (thanks @return42)
* [fix] changeover of the unit tests to the simple themeMarkus Heiser2022-02-20
| | | | Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
* Merge pull request #848 from not-my-profile/help-routeAlexandre Flament2022-02-05
|\ | | | | Introduce `/help` route
| * [enh] introduce /help routeMartin Fischer2022-02-01
| | | | | | | | | | Translation will be implemented in the future. For now the "en" in /help/en/<pagename> is hardcoded.
| * [help] remove link from about.md titleMartin Fischer2022-02-01
| | | | | | | | | | | | | | Now that about.html extends page_with_header.html it already has a link to the start page and removing the link makes it easier to extract the page title from the Markdown for the following commit.
* | Merge pull request #839 from dalf/docs_searx_utilsMarkus Heiser2022-02-04
|\ \ | | | | | | [mod] add documentation about searx.utils
| * | [mod] add documentation about searx.utilsAlexandre Flament2022-01-29
| |/ | | | | | | | | | | | | This module is a toolbox for the engines. Is should be documented. In addition, searx/utils.py is checked by pylint.
* / preferences: Set autocomplete=off for formMartin Fischer2022-02-04
|/ | | | | | Otherwise you can change the value of a select, refresh the page and the preferences stay changed, leaving the wrong impression that they were saved.
* [typing] add results.TimingMartin Fischer2022-01-17
|
* [fix] external bangs: don't overwrite Bangs in data trieMarkus Heiser2022-01-12
| | | | | | | | | | 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>
* Merge pull request #708 from not-my-profile/pref-refactorMartin Fischer2022-01-07
|\ | | | | Refactor `preferences`
| * [refactor] refactor SwitchableSettingMartin Fischer2022-01-06
| | | | | | | | | | | | | | | | 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.
| * [refactor] add type hints & remove Setting._post_initMartin Fischer2022-01-06
| | | | | | | | | | Previously the Setting classes used a horrible _post_init hack that prevented proper type checking.
* | [fix] remove broken ? search operatorMartin Fischer2022-01-06
|/ | | | | | | | | | | | | | | | | 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.
* Merge pull request #634 from not-my-profile/powered-byAlexandre Flament2022-01-06
|\ | | | | Introduce `categories_as_tabs` & group engines in tabs
| * [enh] change categories_as_tabs from a list to a dictMartin Fischer2022-01-05
| | | | | | | | | | | | | | | | | | 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
| * [enh] introduce categories_as_tabsMartin Fischer2022-01-03
| | | | | | | | | | | | | | | | | | 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.
* | Merge pull request #596 from dalf/upgrade-httpxAlexandre Flament2022-01-05
|\ \ | | | | | | Upgrade httpx
| * | [mod] upgrade httpx 0.21.2Alexandre Flament2022-01-05
| |/ | | | | | | | | | | | | | | 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.
* / reference docs.searxng.orgAlexandre Flament2022-01-02
|/
* [mod] webutils.py: remove dead codeAlexandre Flament2021-12-28
| | | | secret_key can't be bytes (see settings_default.py)
* [fix] issues reported by pylintMarkus Heiser2021-12-27
| | | | | | | | Fix pylint issues from commit (3d96a983) [format.python] initial formatting of the python code Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
* [format.python] initial formatting of the python codeMarkus Heiser2021-12-27
| | | | | | | | | | 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>
* [format.python] disable py code formatting for some hunks of codeMarkus Heiser2021-12-27
| | | | | | | 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>
* [fix] oscar theme: use SearXNG logo and wordmarkMarkus Heiser2021-11-26
| | | | Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
* healthcheck endpointIgor Rzegocki2021-10-29
|
* 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"