diff options
author | Alexandre Flament <alex@al-f.net> | 2020-12-01 10:18:57 +0100 |
---|---|---|
committer | Alexandre Flament <alex@al-f.net> | 2020-12-17 11:33:28 +0100 |
commit | 9bc1856e2b23ef3572e5715895ee626f08ec24a7 (patch) | |
tree | 44421b8b123bc997b1d5d559278c05323bd0189a /tests/unit | |
parent | 88660fde90c2d618f2d317ff1cafdf71508982f6 (diff) | |
download | searxng-9bc1856e2b23ef3572e5715895ee626f08ec24a7.tar.gz searxng-9bc1856e2b23ef3572e5715895ee626f08ec24a7.zip |
[mod] themes: remove legacy, courgette and pix-art themes
Diffstat (limited to 'tests/unit')
-rw-r--r-- | tests/unit/test_webapp.py | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/tests/unit/test_webapp.py b/tests/unit/test_webapp.py index ac8851e33..32aa22fb5 100644 --- a/tests/unit/test_webapp.py +++ b/tests/unit/test_webapp.py @@ -64,7 +64,7 @@ class ViewsTestCase(SearxTestCase): def get_current_theme_name_mock(override=None): if override: return override - return 'legacy' + return 'oscar' self.setattr4test(webapp, 'get_current_theme_name', get_current_theme_name_mock) @@ -73,7 +73,9 @@ class ViewsTestCase(SearxTestCase): def test_index_empty(self): result = self.app.post('/') self.assertEqual(result.status_code, 200) - self.assertIn(b'<div class="title"><h1>searx</h1></div>', result.data) + self.assertIn(b'<div class="text-hide center-block" id="main-logo">' + + b'<img class="center-block img-responsive" src="/static/themes/oscar/img/logo_searx_a.png"' + + b' alt="searx logo" />searx</div>', result.data) def test_index_html_post(self): result = self.app.post('/', data={'q': 'test'}) @@ -88,7 +90,7 @@ class ViewsTestCase(SearxTestCase): def test_search_empty_html(self): result = self.app.post('/search', data={'q': ''}) self.assertEqual(result.status_code, 200) - self.assertIn(b'<div class="title"><h1>searx</h1></div>', result.data) + self.assertIn(b'<span class="instance pull-left"><a href="/">searx</a></span>', result.data) def test_search_empty_json(self): result = self.app.post('/search', data={'q': '', 'format': 'json'}) @@ -106,11 +108,13 @@ class ViewsTestCase(SearxTestCase): result = self.app.post('/search', data={'q': 'test'}) self.assertIn( - b'<h3 class="result_title"><img width="14" height="14" class="favicon" src="/static/themes/legacy/img/icons/icon_youtube.ico" alt="youtube" /><a href="http://second.test.xyz" rel="noreferrer">Second <span class="highlight">Test</span></a></h3>', # noqa + b'<h4 class="result_header" id="result-2"><img width="32" height="32" class="favicon"' + + b' src="/static/themes/oscar/img/icons/youtube.png" alt="youtube" /><a href="http://second.test.xyz"' + + b' rel="noreferrer" aria-labelledby="result-2">Second <span class="highlight">Test</span></a></h4>', # noqa result.data ) self.assertIn( - b'<p class="content">first <span class="highlight">test</span> content<br class="last"/></p>', # noqa + b'<p class="result-content">second <span class="highlight">test</span> content</p>', # noqa result.data ) @@ -186,18 +190,18 @@ class ViewsTestCase(SearxTestCase): result.data ) self.assertIn( - b'<legend>Default categories</legend>', + b'<label class="col-sm-3 col-md-2" for="categories">Default categories</label>', result.data ) self.assertIn( - b'<legend>Interface language</legend>', + b'<label class="col-sm-3 col-md-2" for="locale">Interface language</label>', result.data ) def test_stats(self): result = self.app.get('/stats') self.assertEqual(result.status_code, 200) - self.assertIn(b'<h2>Engine stats</h2>', result.data) + self.assertIn(b'<h1>Engine stats</h1>', result.data) def test_robots_txt(self): result = self.app.get('/robots.txt') |