Add shared folder
This commit is contained in:
		
							
								
								
									
										0
									
								
								app/shared/query/__init__.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										0
									
								
								app/shared/query/__init__.py
									
									
									
									
									
										Normal file
									
								
							
							
								
								
									
										6
									
								
								app/shared/query/service.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								app/shared/query/service.py
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,6 @@
 | 
			
		||||
class QueryService:
 | 
			
		||||
    '''An example of a service that is shared'''
 | 
			
		||||
 | 
			
		||||
    @staticmethod
 | 
			
		||||
    def execute(query):
 | 
			
		||||
        return 'Success'
 | 
			
		||||
							
								
								
									
										7
									
								
								app/shared/query/service_test.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								app/shared/query/service_test.py
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,7 @@
 | 
			
		||||
from .service import QueryService
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def test_execute():
 | 
			
		||||
    result = QueryService.execute('a complicated query')
 | 
			
		||||
 | 
			
		||||
    assert result == 'Success'
 | 
			
		||||
		Reference in New Issue
	
	Block a user