Skip to content

Commit 28768ba

Browse files
committed
chore: trigger both test categories with the same command.
1 parent e8551b5 commit 28768ba

File tree

6 files changed

+16
-5
lines changed

6 files changed

+16
-5
lines changed

.github/workflows/ci.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,12 @@ jobs:
2626
python-version: ${{ matrix.python-version }}
2727

2828
- name: Install dependencies
29+
working-directory: ./falcon_backend
2930
run: |
30-
cd falcon_backend/
3131
python -m pip install --upgrade pip
3232
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
3333
3434
- name: Run tests
35+
working-directory: ./falcon_backend
3536
run: |
3637
pytest

falcon_backend/pytest.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
[pytest]
2-
addopts = --ignore=tests/graph_app
2+
DJANGO_SETTINGS_MODULE = falcon_backend.settings

falcon_backend/readme.md

+1-3
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,8 @@ $ python manage.py runserver
4040

4141
#### Running tests
4242
```sh
43-
# unit tests algorithm
43+
# unit tests algorithm / rest api test
4444
$ pytest
45-
# rest api/utils/graph tests
46-
$ python manage.py test
4745
```
4846

4947

falcon_backend/requirements-dev.txt

+5
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,26 @@ django-cors-headers==4.4.0
66
django-extensions==3.2.3
77
django-filter==24.2
88
djangorestframework==3.15.2
9+
Faker==12.0.1
910
filelock==3.15.4
1011
identify==2.6.0
1112
iniconfig==2.0.0
1213
JSON-log-formatter==0.5.1
1314
Markdown==3.6
1415
marshmallow==3.21.3
16+
mixer==7.2.2
1517
nodeenv==1.9.1
1618
packaging==24.1
1719
platformdirs==4.2.2
1820
pluggy==1.5.0
1921
pre-commit==3.7.1
2022
pytest==8.2.2
23+
pytest-django==4.8.0
24+
python-dateutil==2.9.0.post0
2125
python-dotenv==1.0.1
2226
python-logstash==0.4.8
2327
PyYAML==6.0.1
2428
ruff==0.5.1
29+
six==1.16.0
2530
sqlparse==0.5.0
2631
virtualenv==20.26.3

falcon_backend/requirements.txt

+5
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,26 @@ django-cors-headers==4.4.0
66
django-extensions==3.2.3
77
django-filter==24.2
88
djangorestframework==3.15.2
9+
Faker==12.0.1
910
filelock==3.15.4
1011
identify==2.6.0
1112
iniconfig==2.0.0
1213
JSON-log-formatter==0.5.1
1314
Markdown==3.6
1415
marshmallow==3.21.3
16+
mixer==7.2.2
1517
nodeenv==1.9.1
1618
packaging==24.1
1719
platformdirs==4.2.2
1820
pluggy==1.5.0
1921
pre-commit==3.7.1
2022
pytest==8.2.2
23+
pytest-django==4.8.0
24+
python-dateutil==2.9.0.post0
2125
python-dotenv==1.0.1
2226
python-logstash==0.4.8
2327
PyYAML==6.0.1
2428
ruff==0.5.1
29+
six==1.16.0
2530
sqlparse==0.5.0
2631
virtualenv==20.26.3

falcon_backend/tests/graph_app/test_cases.py

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from unittest import TestCase
22

3+
import pytest
34
from django.test import override_settings
45

56
from graph_app.management.commands.give_me_the_odds import compute_odds
@@ -8,6 +9,7 @@
89

910
class TestCases(TestCase):
1011
@override_settings(DEBUG=True)
12+
@pytest.mark.django_db
1113
def test_case(self):
1214
for case in range(1, 5):
1315
with self.subTest(case=case):

0 commit comments

Comments
 (0)