mirror of
https://github.com/searxng/searxng
synced 2024-01-01 18:24:07 +00:00
[fix] infoboxes and answers : pass all tests
This commit is contained in:
parent
829c758970
commit
728fc611da
@ -8,8 +8,6 @@
|
|||||||
<h3 class="result_title"><a href="{{ result.url }}">{{ result.title|safe }}</a></h3>
|
<h3 class="result_title"><a href="{{ result.url }}">{{ result.title|safe }}</a></h3>
|
||||||
<p class="url">{{ result.pretty_url }} <a class="cache_link" href="https://web.archive.org/web/{{ result.url }}">cached</a></p>
|
<p class="url">{{ result.pretty_url }} <a class="cache_link" href="https://web.archive.org/web/{{ result.url }}">cached</a></p>
|
||||||
{% if result.publishedDate %}<p class="published_date">{{ result.publishedDate }}</p>{% endif %}
|
{% if result.publishedDate %}<p class="published_date">{{ result.publishedDate }}</p>{% endif %}
|
||||||
<p class="content">
|
<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>
|
||||||
{% if result.img_src %}<img src="{{ result.img_src|safe }}" class="image" />{% endif %}
|
|
||||||
{% if result.content %}{{ result.content|safe }}<br class="last"/>{% endif %}</p>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -43,6 +43,8 @@ class ViewsTestCase(SearxTestCase):
|
|||||||
def test_index_html(self, search):
|
def test_index_html(self, search):
|
||||||
search.return_value = (
|
search.return_value = (
|
||||||
self.test_results,
|
self.test_results,
|
||||||
|
set(),
|
||||||
|
set(),
|
||||||
set()
|
set()
|
||||||
)
|
)
|
||||||
result = self.app.post('/', data={'q': 'test'})
|
result = self.app.post('/', data={'q': 'test'})
|
||||||
@ -51,7 +53,7 @@ class ViewsTestCase(SearxTestCase):
|
|||||||
result.data
|
result.data
|
||||||
)
|
)
|
||||||
self.assertIn(
|
self.assertIn(
|
||||||
'<p class="content">first <span class="highlight">test</span> content<br /></p>', # noqa
|
'<p class="content">first <span class="highlight">test</span> content<br class="last"/></p>', # noqa
|
||||||
result.data
|
result.data
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -59,6 +61,8 @@ class ViewsTestCase(SearxTestCase):
|
|||||||
def test_index_json(self, search):
|
def test_index_json(self, search):
|
||||||
search.return_value = (
|
search.return_value = (
|
||||||
self.test_results,
|
self.test_results,
|
||||||
|
set(),
|
||||||
|
set(),
|
||||||
set()
|
set()
|
||||||
)
|
)
|
||||||
result = self.app.post('/', data={'q': 'test', 'format': 'json'})
|
result = self.app.post('/', data={'q': 'test', 'format': 'json'})
|
||||||
@ -75,6 +79,8 @@ class ViewsTestCase(SearxTestCase):
|
|||||||
def test_index_csv(self, search):
|
def test_index_csv(self, search):
|
||||||
search.return_value = (
|
search.return_value = (
|
||||||
self.test_results,
|
self.test_results,
|
||||||
|
set(),
|
||||||
|
set(),
|
||||||
set()
|
set()
|
||||||
)
|
)
|
||||||
result = self.app.post('/', data={'q': 'test', 'format': 'csv'})
|
result = self.app.post('/', data={'q': 'test', 'format': 'csv'})
|
||||||
@ -90,6 +96,8 @@ class ViewsTestCase(SearxTestCase):
|
|||||||
def test_index_rss(self, search):
|
def test_index_rss(self, search):
|
||||||
search.return_value = (
|
search.return_value = (
|
||||||
self.test_results,
|
self.test_results,
|
||||||
|
set(),
|
||||||
|
set(),
|
||||||
set()
|
set()
|
||||||
)
|
)
|
||||||
result = self.app.post('/', data={'q': 'test', 'format': 'rss'})
|
result = self.app.post('/', data={'q': 'test', 'format': 'rss'})
|
||||||
|
Loading…
Reference in New Issue
Block a user