| 
									
										
										
										
											2016-11-19 20:53:51 +01:00
										 |  |  | # -*- coding: utf-8 -*- | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | from mock import Mock | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | from searx.answerers import answerers | 
					
						
							| 
									
										
										
										
											2021-09-02 16:01:34 +02:00
										 |  |  | from tests import SearxTestCase | 
					
						
							| 
									
										
										
										
											2016-11-19 20:53:51 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class AnswererTest(SearxTestCase): | 
					
						
							|  |  |  |     def test_unicode_input(self): | 
					
						
							|  |  |  |         query = Mock() | 
					
						
							| 
									
										
										
										
											2020-08-06 17:42:46 +02:00
										 |  |  |         unicode_payload = 'árvíztűrő tükörfúrógép' | 
					
						
							| 
									
										
										
										
											2016-11-19 20:53:51 +01:00
										 |  |  |         for answerer in answerers: | 
					
						
							| 
									
										
										
										
											2020-08-06 17:42:46 +02:00
										 |  |  |             query.query = '{} {}'.format(answerer.keywords[0], unicode_payload) | 
					
						
							| 
									
										
										
										
											2016-11-19 20:53:51 +01:00
										 |  |  |             self.assertTrue(isinstance(answerer.answer(query), list)) |