commit: 06e070aee26a432f176b19c91fb8bae3553415d7
parent c40d8e1d15cd93e87b3aa254953cee6ba39d79fd
Author: rinpatch <rinpatch@airmail.cc>
Date: Mon, 23 Apr 2018 12:55:25 +0300
Fix string length
Diffstat:
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
@@ -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)