mirror of
https://github.com/searxng/searxng.git
synced 2025-07-12 15:59:21 +02:00
[mod] searx.search: EngineRef, SearchQuery: add __repr__ and __eq__ methods
This commit is contained in:
parent
aa6eaf603f
commit
8fc74d0d7b
3 changed files with 36 additions and 5 deletions
|
@ -7,6 +7,7 @@ import sys
|
|||
from mock import Mock, patch
|
||||
from nose2.tools import params
|
||||
|
||||
from searx.search import SearchQuery
|
||||
from searx.testing import SearxTestCase
|
||||
|
||||
|
||||
|
@ -91,7 +92,7 @@ class StandaloneSearx(SearxTestCase):
|
|||
args = sas.parse_argument(['rain', ])
|
||||
search_q = sas.get_search_query(args)
|
||||
self.assertTrue(search_q)
|
||||
self.assertEqual(str(search_q), 'rain;[]')
|
||||
self.assertEqual(search_q, SearchQuery('rain', [], ['general'], 'all', 0, 1, None, None, None))
|
||||
|
||||
def test_no_parsed_url(self):
|
||||
"""test no_parsed_url func"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue