From 06e070aee26a432f176b19c91fb8bae3553415d7 Mon Sep 17 00:00:00 2001 From: rinpatch Date: Mon, 23 Apr 2018 12:55:25 +0300 Subject: [PATCH] Fix string length --- tests/unit/engines/test_currency_convert.py | 16 ++++++++++++++-- 1 file 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)