mirror of
				https://github.com/mealie-recipes/mealie.git
				synced 2025-10-30 17:53:31 -04:00 
			
		
		
		
	
		
			
	
	
		
			15 lines
		
	
	
		
			262 B
		
	
	
	
		
			Python
		
	
	
	
	
	
		
		
			
		
	
	
			15 lines
		
	
	
		
			262 B
		
	
	
	
		
			Python
		
	
	
	
	
	
|  | import pytest | ||
|  | 
 | ||
|  | from mealie.db.database import Database, get_database | ||
|  | from mealie.db.db_setup import SessionLocal | ||
|  | 
 | ||
|  | 
 | ||
|  | @pytest.fixture() | ||
|  | def database() -> Database: | ||
|  |     try: | ||
|  |         db = SessionLocal() | ||
|  |         yield get_database(db) | ||
|  | 
 | ||
|  |     finally: | ||
|  |         db.close() |