mirror of
				https://github.com/mealie-recipes/mealie.git
				synced 2025-11-04 03:03:18 -05:00 
			
		
		
		
	
		
			
				
	
	
		
			15 lines
		
	
	
		
			295 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			15 lines
		
	
	
		
			295 B
		
	
	
	
		
			Python
		
	
	
	
	
	
import pytest
 | 
						|
 | 
						|
from mealie.db.db_setup import SessionLocal
 | 
						|
from mealie.repos.all_repositories import AllRepositories, get_repositories
 | 
						|
 | 
						|
 | 
						|
@pytest.fixture()
 | 
						|
def database() -> AllRepositories:
 | 
						|
    try:
 | 
						|
        db = SessionLocal()
 | 
						|
        yield get_repositories(db)
 | 
						|
 | 
						|
    finally:
 | 
						|
        db.close()
 |