summaryrefslogtreecommitdiff
path: root/tests/unit
AgeCommit message (Collapse)Author
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
2020-11-14Merge pull request #2309 from dalf/mod_search_reprAlexandre Flament
[mod] searx.search: EngineRef, SearchQuery: add __repr__ and __eq__ methods
2020-11-10[mod] searx.search: EngineRef, SearchQuery: add __repr__ and __eq__ methodsAlexandre Flament
2020-11-06[fix] fix of / and /searchAlexandre Flament
* URL / : the index page displayed the selected or the default category. * URL / : when the q parameter is set using the URL, the redirect includes the URL query. * URL /search : an empty query doesn't raise an exception.
2020-11-05chg: test: suppress outputrachmadaniHaryono
2020-11-04Feature/standalone searx update (#1591)rachmadani haryono
* chg: dev: update standalone_searx parent d8a5df721b33dd8a7cc9e21dba4060f21d629f69 author rachmadaniHaryono <foreturiga@gmail.com> 1603896594 +0800 committer rachmadaniHaryono <foreturiga@gmail.com> 1603896619 +0800 chg: dev: debug engine_shortcuts chg: dev: only initilize if engine is given chg: dev: split main chg: dev: standalone_searx chg: dev: update standalone_searx chg: doc: remove unnecessary log chg: test: differentiate travis chg: test: disable shortcut chg: test: use default engine settings fix: dev: category choices fix: dev: duplicate engine shortcut fix: dev: travis python3 fix: test: use empty string as shortcut fix: test: apkm fix: test: engine shortcut fix: test: mypy fix: test: parameter fix: test: pep8 fix: test: py2 compatibilities fix: test: searx settings fix: test: travis engines new: dev: deduplicate engine new: dev: main receive engines parameter new: dev: parse_argument accept engines parameter new: dev: split search query from get_result func new: test: basic result case Suggestions: use RawTextQuery to make the suggestions URLs. Update all themes accordingly. * new: doc: searx import and init * chg: dev: parse_argument - doc - run on __main__ - simple parse_args * chg: doc: module * chg: dev: import section - remove unused python path modification - new required package * chg: dev: script run - parse_argument func return directly parsed results - main func return dict instead json text - dump directly on sys.stdout.write * chg: dev: get_search_query and get_search_query func * chg: dev: main func - move inner function outside - return dict instead of json text * new: dev: add utils to doc sys path * new: doc: standalone_searx * fix: doc: run script * chg: dev: mypy type hint * chg: dev: SearchQuery don't have attr engines * chg: dev: reset engines __init__ * chg: test: unit test update * chg: dev: pylint and flake8 * new: test: standalone_searx * chg: dev: main func and doc * chg: dev: import and type hint * new: dev: main func - remove get_result func - single func which just translate dict * chg: test: put mypy on dev requirement * chg: doc: update * new: doc: add standalone_searx module member * chg: doc: shell command line * chg: dev: remove mypy * chg: doc: module docstring
2020-11-02[mod] separate index and search routesMarc Abonce Seguin
This makes it easier to separately handle search and index requests from a web server or from a reverse proxy. If a request to index contains a query, a permanent redirect HTTP response is returned. This should give some level of backwards compatibility for users that have set a searx instance in their browser's search bar.
2020-10-26Merge pull request #565 from MarcAbonce/onionsAdam Tauber
New category: Onions
2020-10-26[fix] resolve query_parts regressionAdam Tauber
2020-10-25[enh] Add onions category with Ahmia, Not Evil and Torcha01200356
Xpath engine and results template changed to account for the fact that archive.org doesn't cache .onions, though some onion engines migth have their own cache. Disabled by default. Can be enabled by setting the SOCKS proxies to wherever Tor is listening and setting using_tor_proxy as True. Requires Tor and updating packages. To avoid manually adding the timeout on each engine, you can set extra_proxy_timeout to account for Tor's (or whatever proxy used) extra time.
2020-10-25Let admins lock user preferencesNoémi Ványi
2020-10-25[fix] adjust query unit testsAdam Tauber
2020-10-24[fix] hash plugin testVenca24
2020-10-23[fix] code styleVenca24
2020-10-23[enh] add plugin converting strings into hash digestsVenca24
2020-10-02[mod] move extract_text, extract_url to searx.utilsAlexandre Flament
2020-09-22[mod] add typing and __slots__Alexandre Flament
2020-09-22[mod] check the engine tokens in searx/webadapter.py instead of searx/search.pyAlexandre Flament
2020-09-22[mod] add searx.search.EngineRefAlexandre Flament
was previously a Dict with two or three keys: name, category, from_bang make clear that this is a engine reference (see tests/unit/test_search.py for example) all variables using this class are renamed accordingly.
2020-09-22[mod] add searx/webadapter.pyAlexandre Flament
* move searx.search.get_search_query_from_webapp to searx.webadapter * move searx.query.SearchQuery to searx.search
2020-09-22[mod] add searx/webutils.pyAlexandre Flament
contains utility functions and classes used only by webapp.py
2020-09-13[fix] searx.utils.HTMLTextExtractor: invalid HTML don't raise an ExceptionAlexandre Flament
Close #2188
2020-09-12[mod] searx.RawTextQuery: the constructor call parse_queryAlexandre Flament
2020-09-10Drop Python 2 (4/n): SearchQuery.query is a str instead of bytesDalf
2020-09-10Drop Python 2 (3/n): objectsDalf
2020-09-10Drop Python 2 (1/n): remove unicode string and url_utilsDalf
2020-09-08[enh] Add command line engines: git grep, find, etc. (#2128)Noémi Ványi
A new "base" engine called command is introduced. It is the foundation for all command line engines for now. You can use this engine to create your own command line engine. Add some engines (commented out to make sure no one enables anything accidentally): * git grep: This engine lets you grep in the searx repo. * locate: If locate is installed and initialized, you can search on the FS. * find: You can find files with a specific name from where you started searx. * pattern search in files: This engine utilizes the command fgrep. * regex search in files: This engine runs `grep` to find a file based on its contents.
2020-08-31Revert "[enh] test: load each engine to check for syntax errors"Alexandre Flament
This reverts commit 4fb3ed2c6335b68f6b28ebc68d5d22f2fd621648.
2020-08-28[enh] test: load each engine to check for syntax errorsDalf