You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
searxng/tests/unit
Markus Heiser fd814aac86 [mod] isolation of botdetection from the limiter
This patch was inspired by the discussion around PR-2882 [2].  The goals of this
patch are:

1. Convert plugin searx.plugin.limiter to normal code [1]
2. isolation of botdetection from the limiter [2]
3. searx/{tools => botdetection}/config.py and drop searx.tools
4. in URL /config, 'limiter.enabled' is true only if the limiter is really
   enabled (Redis is available).

This patch moves all the code that belongs to botdetection into namespace
searx.botdetection and code that belongs to limiter is placed in namespace
searx.limiter.

Tthe limiter used to be a plugin at some point botdetection was added, it was
not a plugin.  The modularization of these two components was long overdue.
With the clear modularization, the documentation could then also be organized
according to the architecture.

[1] https://github.com/searxng/searxng/pull/2882
[2] https://github.com/searxng/searxng/pull/2882#issuecomment-1741716891

To test:

- check the app works without the limiter, check `/config`
- check the app works with the limiter and with the token, check `/config`
- make docs.live .. and read
  - http://0.0.0.0:8000/admin/searx.limiter.html
  - http://0.0.0.0:8000/src/searx.botdetection.html#botdetection

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
12 months ago
..
engines [format.python] initial formatting of the python code 3 years ago
network bing.py: resolve bing.com/ck/a redirections 2 years ago
settings [fix] make flask_babel.gettext() work in engine modules (L10n & threads) 1 year ago
__init__.py [format.python] initial formatting of the python code 3 years ago
test_answerers.py [format.python] initial formatting of the python code 3 years ago
test_engines_init.py Fix: don't crash when engine or name is missing in settings.yml 2 years ago
test_exceptions.py Add search.suspended_times settings 2 years ago
test_external_bangs.py [fix] external bangs: don't overwrite Bangs in data trie 3 years ago
test_locales.py [fix] spelling 1 year ago
test_plugins.py [mod] isolation of botdetection from the limiter 12 months ago
test_preferences.py [fix] move locale code from webapp.py to locales.py and fix #1303 2 years ago
test_query.py [feat] implement feeling lucky feature 1 year ago
test_results.py [format.python] initial formatting of the python code 3 years ago
test_search.py [feat] implement feeling lucky feature 1 year ago
test_settings_loader.py [fix] typos / reported by @kianmeng in searx PR-3366 2 years ago
test_utils.py [fix] HTMLParser: undocumented not implemented method 1 year ago
test_webadapter.py [fix] changeover of the unit tests to the simple theme 3 years ago
test_webapp.py [fix] spelling 1 year ago
test_webutils.py [mod] move some code from webapp module to webutils module (no functional change) 1 year ago