|
@@ -30,8 +30,20 @@ class TestCurrencyConvertEngine(SearxTestCase):
|
30
|
30
|
dicto['to_name'] = "United States dollar"
|
31
|
31
|
response = mock.Mock(text='a,b,c,d', search_params=dicto)
|
32
|
32
|
self.assertEqual(currency_convert.response(response), [])
|
33
|
|
-
|
34
|
|
- body = "ddg_spice_currency(\n{\n\"conversion\":{\n\"converted-amount\": \"0.5\"\n}\n\"topConversions\":[\n{\n},\n{\n}\n]\n}\n);"
|
|
33
|
+ body = """ddg_spice_currency(
|
|
34
|
+ {
|
|
35
|
+ "conversion":{
|
|
36
|
+ "converted-amount": "0.5"
|
|
37
|
+ },
|
|
38
|
+ "topConversions":[
|
|
39
|
+ {
|
|
40
|
+ },
|
|
41
|
+ {
|
|
42
|
+ }
|
|
43
|
+ ]
|
|
44
|
+ }
|
|
45
|
+ );
|
|
46
|
+ """
|
35
|
47
|
response = mock.Mock(text=body, search_params=dicto)
|
36
|
48
|
results = currency_convert.response(response)
|
37
|
49
|
self.assertEqual(type(results), list)
|