File tree 4 files changed +6
-5
lines changed
4 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -26,11 +26,12 @@ jobs:
26
26
python-version : ${{ matrix.python-version }}
27
27
28
28
- name : Install dependencies
29
+ working-directory : ./falcon_backend
29
30
run : |
30
- cd falcon_backend/
31
31
python -m pip install --upgrade pip
32
32
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
33
33
34
34
- name : Run tests
35
+ working-directory : ./falcon_backend
35
36
run : |
36
37
pytest
Original file line number Diff line number Diff line change 1
1
[pytest]
2
- addopts = -- ignore =tests/graph_app
2
+ DJANGO_SETTINGS_MODULE = falcon_backend.settings
Original file line number Diff line number Diff line change @@ -40,10 +40,8 @@ $ python manage.py runserver
40
40
41
41
#### Running tests
42
42
``` sh
43
- # unit tests algorithm
43
+ # unit tests algorithm / rest api test
44
44
$ pytest
45
- # rest api/utils/graph tests
46
- $ python manage.py test
47
45
```
48
46
49
47
Original file line number Diff line number Diff line change 1
1
from unittest import TestCase
2
2
3
+ import pytest
3
4
from django .test import override_settings
4
5
5
6
from graph_app .management .commands .give_me_the_odds import compute_odds
8
9
9
10
class TestCases (TestCase ):
10
11
@override_settings (DEBUG = True )
12
+ @pytest .mark .django_db
11
13
def test_case (self ):
12
14
for case in range (1 , 5 ):
13
15
with self .subTest (case = case ):
You can’t perform that action at this time.
0 commit comments