From 9bc1856e2b23ef3572e5715895ee626f08ec24a7 Mon Sep 17 00:00:00 2001 From: Alexandre Flament Date: Tue, 1 Dec 2020 10:18:57 +0100 Subject: [mod] themes: remove legacy, courgette and pix-art themes --- tests/unit/test_webapp.py | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'tests/unit') 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'

searx

', result.data) + self.assertIn(b'', 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'

searx

', result.data) + self.assertIn(b'searx', 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'

youtubeSecond Test

', # noqa + b'

youtubeSecond Test

', # noqa result.data ) self.assertIn( - b'

first test content

', # noqa + b'

second test content

', # noqa result.data ) @@ -186,18 +190,18 @@ class ViewsTestCase(SearxTestCase): result.data ) self.assertIn( - b'Default categories', + b'', result.data ) self.assertIn( - b'Interface language', + b'', result.data ) def test_stats(self): result = self.app.get('/stats') self.assertEqual(result.status_code, 200) - self.assertIn(b'

Engine stats

', result.data) + self.assertIn(b'

Engine stats

', result.data) def test_robots_txt(self): result = self.app.get('/robots.txt') -- cgit v1.2.3-54-g00ecf