Skip to content

Commit 1e95bd8

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

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-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/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)