summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMarkus Heiser <markus.heiser@darmarit.de>2023-06-02 15:30:02 +0200
committerMarkus Heiser <markus.heiser@darmarit.de>2023-06-02 19:05:43 +0200
commit2149e88bdd64a66d867ad1f5c46e6aa0977d837a (patch)
tree662c0ec8aa98c3c9b609fa9f4345503c94516e06 /tests
parentd289a8b22515e36d015b51c95bce716427329ca5 (diff)
[mod] template preferences: split into elements (no functional change)
HINT: this patch has no functional change / it is the preparation for following changes and bugfixes Over the years, the preferences template became an unmanageable beast. To make the source code more readable the monolith is splitted into elements. The splitting into elements also has the advantage that a new template can make use of them. The reversed checkbox is a quirk that is only used in the prefereces and must be eliminated in the long term. For this the macro 'checkbox_onoff_reversed' was added to the preferences.html template. The 'checkbox' macro is also a quirk of the preferences.html we don't want to use in other templates (it is an input-checkbox in a HTML form that was misused for status display). Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/test_webapp.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/unit/test_webapp.py b/tests/unit/test_webapp.py
index 9f10df90..1c8f8a40 100644
--- a/tests/unit/test_webapp.py
+++ b/tests/unit/test_webapp.py
@@ -201,7 +201,7 @@ class ViewsTestCase(SearxTestCase):
self.assertIn(
b'<input type="checkbox" id="checkbox_general" name="category_general" checked="checked"/>', result.data
)
- self.assertIn(b'<legend id="pref_locale">Interface language</legend>', result.data)
+ self.assertIn(b'<legend id="pref_ui_locale">Interface language</legend>', result.data)
def test_browser_locale(self):
result = self.app.get('/preferences', headers={'Accept-Language': 'zh-tw;q=0.8'})