From 728fc611da126ddb20cb16ccaa214a1f6d8bcdbd Mon Sep 17 00:00:00 2001 From: dalf Date: Wed, 1 Oct 2014 22:46:31 +0200 Subject: [PATCH] [fix] infoboxes and answers : pass all tests --- searx/templates/default/result_templates/default.html | 4 +--- searx/tests/test_webapp.py | 10 +++++++++- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/searx/templates/default/result_templates/default.html b/searx/templates/default/result_templates/default.html index 277946202..938d66d04 100644 --- a/searx/templates/default/result_templates/default.html +++ b/searx/templates/default/result_templates/default.html @@ -8,8 +8,6 @@

{{ result.title|safe }}

{{ result.pretty_url }} cached

{% if result.publishedDate %}

{{ result.publishedDate }}

{% endif %} -

- {% if result.img_src %}{% endif %} - {% if result.content %}{{ result.content|safe }}
{% endif %}

+

{% if result.img_src %}{% endif %}{% if result.content %}{{ result.content|safe }}
{% endif %}

diff --git a/searx/tests/test_webapp.py b/searx/tests/test_webapp.py index 9d1722eeb..9cf586180 100644 --- a/searx/tests/test_webapp.py +++ b/searx/tests/test_webapp.py @@ -43,6 +43,8 @@ class ViewsTestCase(SearxTestCase): def test_index_html(self, search): search.return_value = ( self.test_results, + set(), + set(), set() ) result = self.app.post('/', data={'q': 'test'}) @@ -51,7 +53,7 @@ class ViewsTestCase(SearxTestCase): result.data ) self.assertIn( - '

first test content

', # noqa + '

first test content

', # noqa result.data ) @@ -59,6 +61,8 @@ class ViewsTestCase(SearxTestCase): def test_index_json(self, search): search.return_value = ( self.test_results, + set(), + set(), set() ) result = self.app.post('/', data={'q': 'test', 'format': 'json'}) @@ -75,6 +79,8 @@ class ViewsTestCase(SearxTestCase): def test_index_csv(self, search): search.return_value = ( self.test_results, + set(), + set(), set() ) result = self.app.post('/', data={'q': 'test', 'format': 'csv'}) @@ -90,6 +96,8 @@ class ViewsTestCase(SearxTestCase): def test_index_rss(self, search): search.return_value = ( self.test_results, + set(), + set(), set() ) result = self.app.post('/', data={'q': 'test', 'format': 'rss'})