Coverage for tests/conftest.py: 100%

12 statements  

« prev     ^ index     » next       coverage.py v7.6.8, created at 2024-11-30 23:18 +0000

1import sys 

2import os 

3from pathlib import Path 

4 

5# Agregar la ruta del directorio raíz del proyecto al sys.path 

6sys.path.insert(0, str(Path(__file__).resolve().parent.parent)) 

7 

8from app import app 

9 

10 

11 

12import pytest 

13from app import app 

14 

15@pytest.fixture 

16def client(): 

17 with app.test_client() as client: 

18 with app.app_context(): 

19 yield client