From 1bbf02fe33b3a0a33254ab98c7c02245b8537385 Mon Sep 17 00:00:00 2001 From: Nicolas Gelot Date: Mon, 4 Feb 2019 13:27:48 +0100 Subject: [PATCH] Fix unittest about /stats endpoint /stats endpoint is remove in spot since 8757470487e5cbb5927075cd40e3c6a1d2b025f0. This patch removes the test about /stats endpoint, and it removes stats dependency in about page. --- searx/templates/__common__/about.html | 3 --- searx/webapp.py | 1 - tests/unit/test_webapp.py | 5 ----- 3 files changed, 9 deletions(-) diff --git a/searx/templates/__common__/about.html b/searx/templates/__common__/about.html index bf1733359..9a3d16dc4 100644 --- a/searx/templates/__common__/about.html +++ b/searx/templates/__common__/about.html @@ -56,8 +56,5 @@ Searx can be added to your browser's search bar; moreover, it can be set as the

Installation/WSGI support?

See the installation and setup wiki page

-

How to debug engines?

-

Stats page contains some useful data about the engines used.

- {% include "__common__/aboutextend.html" ignore missing %} diff --git a/searx/webapp.py b/searx/webapp.py index 93bcaabff..33e6258c9 100644 --- a/searx/webapp.py +++ b/searx/webapp.py @@ -735,7 +735,6 @@ def robots(): return Response("""User-agent: * Allow: / Allow: /about -Disallow: /stats Disallow: /preferences Disallow: /*?*q=* """, mimetype='text/plain') diff --git a/tests/unit/test_webapp.py b/tests/unit/test_webapp.py index f8aa531fc..2b95f63e7 100644 --- a/tests/unit/test_webapp.py +++ b/tests/unit/test_webapp.py @@ -96,11 +96,6 @@ class ViewsTestCase(TestCase): result.data ) - def test_stats(self): - result = self.app.get('/stats') - self.assertEqual(result.status_code, 200) - self.assertIn(b'

Engine stats

', result.data) - def test_robots_txt(self): result = self.app.get('/robots.txt') self.assertEqual(result.status_code, 200) -- GitLab