Skip to content

Commit eb8e0b3

Browse files
author
Kairo de Araujo
committed
Included the unit tests to run in tox
This commit adds to tox.ini the unit tests. It guarantee that the tests will run in the CI if new changes or tests are added. Signed-off-by: Kairo de Araujo <[email protected]>
1 parent 9de90d0 commit eb8e0b3

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

tests/conftest.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@
66
import pytest
77
from werkzeug.test import TestResponse
88

9-
from app import tern_api
9+
from app import tern_app
1010
from tests.utils import RequestDataTest
1111

1212

1313
@pytest.fixture
1414
def api_request():
1515
def _api_request(request_data: RequestDataTest) -> TestResponse:
16-
with tern_api.test_client() as api_client:
17-
with tern_api.app_context():
16+
with tern_app.test_client() as api_client:
17+
with tern_app.app_context():
1818
if request_data.method.lower() == "get":
1919
response = api_client.get(
2020
request_data.endpoint, json=request_data.payload

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tox]
2-
envlist = py39,py310,lint
2+
envlist = py39,lint,test
33

44
[flake8]
55
exclude = ownca/__init__.py,venv,.venv,settings.py,.git,.tox,dist,docs,*lib/python*,*egg,build,tools

0 commit comments

Comments
 (0)