mirror of
				https://github.com/searxng/searxng
				synced 2024-01-01 19:24:07 +01:00 
			
		
		
		
	[fix] search mocking in webapp test
This commit is contained in:
		
							parent
							
								
									a757c2f005
								
							
						
					
					
						commit
						044809e298
					
				
					 1 changed files with 2 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -5,6 +5,7 @@ from mock import Mock
 | 
			
		|||
from urlparse import ParseResult
 | 
			
		||||
from searx import webapp
 | 
			
		||||
from searx.testing import SearxTestCase
 | 
			
		||||
from searx.search import Search
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
class ViewsTestCase(SearxTestCase):
 | 
			
		||||
| 
						 | 
				
			
			@ -41,7 +42,7 @@ class ViewsTestCase(SearxTestCase):
 | 
			
		|||
                                                results_number=lambda: 3,
 | 
			
		||||
                                                results_length=lambda: len(self.test_results))
 | 
			
		||||
 | 
			
		||||
        webapp.Search.search = search_mock
 | 
			
		||||
        Search.search = search_mock
 | 
			
		||||
 | 
			
		||||
        def get_current_theme_name_mock(override=None):
 | 
			
		||||
            return 'legacy'
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue