Loading tests/unit/test_webapp.py +9 −1 Original line number Original line Diff line number Diff line Loading @@ -126,7 +126,15 @@ class ViewsTestCase(SearxTestCase): def test_search_html(self): def test_search_html(self): result = self.app.post('/search', data={'q': 'test'}) result = self.app.post('/search', data={'q': 'test'}) self.assertIn(b'<span>\nsecond <span class="highlight">test</span>', result.data) # noqa self.assertIn( b'<span class="url_o1"><span class="url_i1">http://second.test.xyz</span></span>', result.data, ) self.assertIn( b'<p class="content">\n second <span class="highlight">test</span> ', result.data, ) def test_index_json(self): def test_index_json(self): result = self.app.post('/', data={'q': 'test', 'format': 'json'}) result = self.app.post('/', data={'q': 'test', 'format': 'json'}) Loading Loading
tests/unit/test_webapp.py +9 −1 Original line number Original line Diff line number Diff line Loading @@ -126,7 +126,15 @@ class ViewsTestCase(SearxTestCase): def test_search_html(self): def test_search_html(self): result = self.app.post('/search', data={'q': 'test'}) result = self.app.post('/search', data={'q': 'test'}) self.assertIn(b'<span>\nsecond <span class="highlight">test</span>', result.data) # noqa self.assertIn( b'<span class="url_o1"><span class="url_i1">http://second.test.xyz</span></span>', result.data, ) self.assertIn( b'<p class="content">\n second <span class="highlight">test</span> ', result.data, ) def test_index_json(self): def test_index_json(self): result = self.app.post('/', data={'q': 'test', 'format': 'json'}) result = self.app.post('/', data={'q': 'test', 'format': 'json'}) Loading