Skip to content

Commit 0a4d27a

Browse files
committed
Refactor tests
1 parent 43a91de commit 0a4d27a

File tree

22 files changed

+1185
-592
lines changed

22 files changed

+1185
-592
lines changed

Makefile

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,19 @@ install:
66

77
# Run formatters (black, isort) with poetry
88
format:
9-
@poetry run isort drf_simple_api_errors test_project
10-
@poetry run black drf_simple_api_errors test_project
9+
@poetry run isort drf_simple_api_errors integration_tests tests
10+
@poetry run black drf_simple_api_errors integration_tests tests
1111

1212
# Check format (black, isort) and linting (flake8)
1313
lint:
14-
@poetry run isort --check drf_simple_api_errors test_project
15-
@poetry run black --check drf_simple_api_errors test_project --exclude migrations
16-
@poetry run flake8 drf_simple_api_errors test_project --max-line-length 88
14+
@poetry run isort --check drf_simple_api_errors integration_tests tests
15+
@poetry run black --check drf_simple_api_errors integration_tests tests --exclude migrations
16+
@poetry run flake8 drf_simple_api_errors integration_tests tests --max-line-length 88
1717

1818
# Run unittests with poetry
1919
test:
20-
@poetry run pytest test_project
20+
@poetry run pytest
2121

2222
# Run code coverage tests coverage with poetry
2323
test/cov:
24-
@poetry run pytest test_project --cov=drf_simple_api_errors --cov-report xml:coverage.xml
24+
@poetry run pytest --cov=drf_simple_api_errors --cov-report xml:coverage.xml

test_project/manage.py renamed to integration_tests/manage.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
def main():
88
"""Run administrative tasks."""
9-
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings")
9+
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings.django")
1010
try:
1111
from django.core.management import execute_from_command_line
1212
except ImportError as exc:
File renamed without changes.

test_project/config/settings.py renamed to integration_tests/settings/django.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
]
4040

4141

42-
ROOT_URLCONF = "config.urls"
42+
ROOT_URLCONF = "settings.urls"
4343

4444

4545
TEMPLATES = [
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)