Test "manage.py check" in tests

pull/84/head
JensDiemer 2021-12-05 16:22:02 +01:00
rodzic 60cc68602a
commit e7cb83633c
1 zmienionych plików z 15 dodań i 0 usunięć

Wyświetl plik

@ -5,6 +5,7 @@ from pathlib import Path
from creole.setup_utils import update_rst_readme
from django.conf import settings
from django.core import checks
from django.test import TestCase
import inventory
@ -93,3 +94,17 @@ class ProjectSettingsTestCase(TestCase):
assert len(dirs) == 1
template_path = Path(dirs[0]).resolve()
assert template_path.is_dir()
def test_manage_check(self):
all_issues = checks.run_checks(
app_configs=None,
tags=None,
include_deployment_checks=True,
databases=None,
)
if all_issues:
print('=' * 100)
for issue in all_issues:
print(issue)
print('=' * 100)
raise AssertionError('There are check issues!')