mgr/dashboard: python unit tests refactoring
* Controller tests: cherrypy config: authentication disabled by default; ability to pass custom config (e.g. enable authentication).
* Auth controller: add tests; test that unauthorized request fails when authentication is enabled.
* DocsTest: clear ENDPOINT_MAP so the test_gen_tags test becomes deterministic.
* pylint: disable=no-name-in-module: fix imports in tests.
Fixes: https://tracker.ceph.com/issues/53083
Signed-off-by: Alfonso Martínez <almartin@redhat.com>
(cherry picked from commit
a6aeded5141ec3a959a86aa4002ccf5ac8d0a523)
Conflicts:
src/pybind/mgr/dashboard/tests/test_docs.py
- Resolved conflicts.
src/pybind/mgr/dashboard/tests/test_iscsi.py
- Resolved conflicts.