mirror of
https://github.com/searxng/searxng.git
synced 2024-11-26 12:51:02 +00:00
Fix string length
This commit is contained in:
parent
c40d8e1d15
commit
06e070aee2
1 changed files with 14 additions and 2 deletions
|
@ -30,8 +30,20 @@ class TestCurrencyConvertEngine(SearxTestCase):
|
|||
dicto['to_name'] = "United States dollar"
|
||||
response = mock.Mock(text='a,b,c,d', search_params=dicto)
|
||||
self.assertEqual(currency_convert.response(response), [])
|
||||
|
||||
body = "ddg_spice_currency(\n{\n\"conversion\":{\n\"converted-amount\": \"0.5\"\n}\n\"topConversions\":[\n{\n},\n{\n}\n]\n}\n);"
|
||||
body = """ddg_spice_currency(
|
||||
{
|
||||
"conversion":{
|
||||
"converted-amount": "0.5"
|
||||
},
|
||||
"topConversions":[
|
||||
{
|
||||
},
|
||||
{
|
||||
}
|
||||
]
|
||||
}
|
||||
);
|
||||
"""
|
||||
response = mock.Mock(text=body, search_params=dicto)
|
||||
results = currency_convert.response(response)
|
||||
self.assertEqual(type(results), list)
|
||||
|
|
Loading…
Reference in a new issue