Fixed typos.
This commit is contained in:
		
							parent
							
								
									2231b02add
								
							
						
					
					
						commit
						4340c0b16c
					
				| @ -44,15 +44,15 @@ def request(query, params): | |||||||
|         # wrong query |         # wrong query | ||||||
|         return params |         return params | ||||||
| 
 | 
 | ||||||
|     ammount, from_currency, to_currency = m.groups() |     amount, from_currency, to_currency = m.groups() | ||||||
|     ammount = float(ammount) |     amount = float(amount) | ||||||
|     from_currency = name_to_iso4217(from_currency.strip()) |     from_currency = name_to_iso4217(from_currency.strip()) | ||||||
|     to_currency = name_to_iso4217(to_currency.strip()) |     to_currency = name_to_iso4217(to_currency.strip()) | ||||||
| 
 | 
 | ||||||
|     q = (from_currency + to_currency).upper() |     q = (from_currency + to_currency).upper() | ||||||
| 
 | 
 | ||||||
|     params['url'] = url.format(from_currency, to_currency) |     params['url'] = url.format(from_currency, to_currency) | ||||||
|     params['ammount'] = ammount |     params['amount'] = amount | ||||||
|     params['from'] = from_currency |     params['from'] = from_currency | ||||||
|     params['to'] = to_currency |     params['to'] = to_currency | ||||||
|     params['from_name'] = iso4217_to_name(from_currency, 'en') |     params['from_name'] = iso4217_to_name(from_currency, 'en') | ||||||
| @ -73,9 +73,9 @@ def response(resp): | |||||||
|         return results |         return results | ||||||
| 
 | 
 | ||||||
|     answer = '{0} {1} = {2} {3}, 1 {1} ({5}) = {4} {3} ({6})'.format( |     answer = '{0} {1} = {2} {3}, 1 {1} ({5}) = {4} {3} ({6})'.format( | ||||||
|         resp.search_params['ammount'], |         resp.search_params['amount'], | ||||||
|         resp.search_params['from'], |         resp.search_params['from'], | ||||||
|         resp.search_params['ammount'] * conversion_rate, |         resp.search_params['amount'] * conversion_rate, | ||||||
|         resp.search_params['to'], |         resp.search_params['to'], | ||||||
|         conversion_rate, |         conversion_rate, | ||||||
|         resp.search_params['from_name'], |         resp.search_params['from_name'], | ||||||
|  | |||||||
| @ -23,7 +23,7 @@ class TestCurrencyConvertEngine(SearxTestCase): | |||||||
| 
 | 
 | ||||||
|     def test_response(self): |     def test_response(self): | ||||||
|         dicto = defaultdict(dict) |         dicto = defaultdict(dict) | ||||||
|         dicto['ammount'] = float(10) |         dicto['amount'] = float(10) | ||||||
|         dicto['from'] = "GBP" |         dicto['from'] = "GBP" | ||||||
|         dicto['to'] = "USD" |         dicto['to'] = "USD" | ||||||
|         dicto['from_name'] = "pound sterling" |         dicto['from_name'] = "pound sterling" | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user