We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5a82462 commit 30a89e2Copy full SHA for 30a89e2
backend/tests/conftest.py
@@ -2,10 +2,26 @@
2
import os
3
import pytest
4
5
+
6
# Adiciona o diretório 'backend' ao caminho de importação do Python
7
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
8
9
from log_config import setup_test_logging
10
+from config import Config
11
+from app import create_app
12
13
+@pytest.fixture
14
+def app():
15
+ app = create_app()
16
+ app.config.update({
17
+ "TESTING": True,
18
+ "MONGO_URI": Config.MONGO_URI
19
+ })
20
+ return app
21
22
23
+def client(app):
24
+ return app.test_client()
25
26
@pytest.fixture(autouse=True)
27
def log_tests(request):
0 commit comments