diff options
author | rinpatch <rinpatch@airmail.cc> | 2018-04-23 12:55:25 +0300 |
---|---|---|
committer | rinpatch <rinpatch@airmail.cc> | 2018-04-23 12:55:25 +0300 |
commit | 06e070aee26a432f176b19c91fb8bae3553415d7 (patch) | |
tree | f59b94c99b04735c0c51940bae861c6fd9e5e273 /tests | |
parent | c40d8e1d15cd93e87b3aa254953cee6ba39d79fd (diff) | |
download | searxng-06e070aee26a432f176b19c91fb8bae3553415d7.tar.gz searxng-06e070aee26a432f176b19c91fb8bae3553415d7.zip |
Fix string length
Diffstat (limited to 'tests')
-rw-r--r-- | tests/unit/engines/test_currency_convert.py | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/tests/unit/engines/test_currency_convert.py b/tests/unit/engines/test_currency_convert.py index 0b948eace..fec194103 100644 --- a/tests/unit/engines/test_currency_convert.py +++ b/tests/unit/engines/test_currency_convert.py @@ -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) |