on master help sign in
[fix] infoboxes and answers : pass all tests
commit728fc611da126ddb20cb16ccaa214a1f6d8bcdbd authordalf <alex@al-f.net> dateWed 1 Oct 2014, 22:46 (12 years ago) parent829c758
2 files changed+10−4
searx/templates/default/result_templates/default.html+1−3 searx/tests/test_webapp.py+9−1
searx/templates/default/result_templates/default.html+1−3
@@ -8,8 +8,6 @@
88 <h3 class="result_title"><a href="{{ result.url }}">{{ result.title|safe }}</a></h3>
99 <p class="url">{{ result.pretty_url }} <a class="cache_link" href="https://web.archive.org/web/{{ result.url }}">cached</a></p>
1010 {% if result.publishedDate %}<p class="published_date">{{ result.publishedDate }}</p>{% endif %}
11− <p class="content">
12− {% if result.img_src %}<img src="{{ result.img_src|safe }}" class="image" />{% endif %}
13− {% if result.content %}{{ result.content|safe }}<br class="last"/>{% endif %}</p>
11+ <p class="content">{% if result.img_src %}<img src="{{ result.img_src|safe }}" class="image" />{% endif %}{% if result.content %}{{ result.content|safe }}<br class="last"/>{% endif %}</p>
1412 </div>
1513</div>
searx/tests/test_webapp.py+9−1
@@ -43,6 +43,8 @@ class ViewsTestCase(SearxTestCase):
4343 def test_index_html(self, search):
4444 search.return_value = (
4545 self.test_results,
46+ set(),
47+ set(),
4648 set()
4749 )
4850 result = self.app.post('/', data={'q': 'test'})
@@ -51,7 +53,7 @@ class ViewsTestCase(SearxTestCase):
5153 result.data
5254 )
5355 self.assertIn(
54− '<p class="content">first <span class="highlight">test</span> content<br /></p>', # noqa
56+ '<p class="content">first <span class="highlight">test</span> content<br class="last"/></p>', # noqa
5557 result.data
5658 )
5759
@@ -59,6 +61,8 @@ class ViewsTestCase(SearxTestCase):
5961 def test_index_json(self, search):
6062 search.return_value = (
6163 self.test_results,
64+ set(),
65+ set(),
6266 set()
6367 )
6468 result = self.app.post('/', data={'q': 'test', 'format': 'json'})
@@ -75,6 +79,8 @@ class ViewsTestCase(SearxTestCase):
7579 def test_index_csv(self, search):
7680 search.return_value = (
7781 self.test_results,
82+ set(),
83+ set(),
7884 set()
7985 )
8086 result = self.app.post('/', data={'q': 'test', 'format': 'csv'})
@@ -90,6 +96,8 @@ class ViewsTestCase(SearxTestCase):
9096 def test_index_rss(self, search):
9197 search.return_value = (
9298 self.test_results,
99+ set(),
100+ set(),
93101 set()
94102 )
95103 result = self.app.post('/', data={'q': 'test', 'format': 'rss'})