summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/engines/test_currency_convert.py16
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)