File tree 6 files changed +16
-5
lines changed
6 files changed +16
-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 @@ -6,21 +6,26 @@ django-cors-headers==4.4.0
6
6
django-extensions == 3.2.3
7
7
django-filter == 24.2
8
8
djangorestframework == 3.15.2
9
+ Faker == 12.0.1
9
10
filelock == 3.15.4
10
11
identify == 2.6.0
11
12
iniconfig == 2.0.0
12
13
JSON-log-formatter == 0.5.1
13
14
Markdown == 3.6
14
15
marshmallow == 3.21.3
16
+ mixer == 7.2.2
15
17
nodeenv == 1.9.1
16
18
packaging == 24.1
17
19
platformdirs == 4.2.2
18
20
pluggy == 1.5.0
19
21
pre-commit == 3.7.1
20
22
pytest == 8.2.2
23
+ pytest-django == 4.8.0
24
+ python-dateutil == 2.9.0.post0
21
25
python-dotenv == 1.0.1
22
26
python-logstash == 0.4.8
23
27
PyYAML == 6.0.1
24
28
ruff == 0.5.1
29
+ six == 1.16.0
25
30
sqlparse == 0.5.0
26
31
virtualenv == 20.26.3
Original file line number Diff line number Diff line change @@ -6,21 +6,26 @@ django-cors-headers==4.4.0
6
6
django-extensions == 3.2.3
7
7
django-filter == 24.2
8
8
djangorestframework == 3.15.2
9
+ Faker == 12.0.1
9
10
filelock == 3.15.4
10
11
identify == 2.6.0
11
12
iniconfig == 2.0.0
12
13
JSON-log-formatter == 0.5.1
13
14
Markdown == 3.6
14
15
marshmallow == 3.21.3
16
+ mixer == 7.2.2
15
17
nodeenv == 1.9.1
16
18
packaging == 24.1
17
19
platformdirs == 4.2.2
18
20
pluggy == 1.5.0
19
21
pre-commit == 3.7.1
20
22
pytest == 8.2.2
23
+ pytest-django == 4.8.0
24
+ python-dateutil == 2.9.0.post0
21
25
python-dotenv == 1.0.1
22
26
python-logstash == 0.4.8
23
27
PyYAML == 6.0.1
24
28
ruff == 0.5.1
29
+ six == 1.16.0
25
30
sqlparse == 0.5.0
26
31
virtualenv == 20.26.3
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