mirror of
https://github.com/django/django.git
synced 2025-08-09 13:28:18 +00:00
[1.8.x] Prevented some test commands from needlessly running system checks.
This is a performance optimization and also fixes test errors with the
upcoming merge of contrib tests into tests/. The tests failed on MySQL
because the models with GeometryField were being checked but the
non-GIS MySQL backend didn't know how to handle them.
Backport of 197dd4b8f1
from master
This commit is contained in:
parent
fdcc9c47d5
commit
a0553d1a7c
3 changed files with 12 additions and 1 deletions
|
@ -5,7 +5,7 @@ from django.core import management
|
|||
from django.core.management import BaseCommand, CommandError, find_commands
|
||||
from django.core.management.utils import find_command, popen_wrapper
|
||||
from django.db import connection
|
||||
from django.test import SimpleTestCase, ignore_warnings
|
||||
from django.test import SimpleTestCase, ignore_warnings, override_settings
|
||||
from django.test.utils import captured_stderr, captured_stdout, extend_sys_path
|
||||
from django.utils import translation
|
||||
from django.utils._os import upath
|
||||
|
@ -13,6 +13,14 @@ from django.utils.deprecation import RemovedInDjango20Warning
|
|||
from django.utils.six import StringIO
|
||||
|
||||
|
||||
# A minimal set of apps to avoid system checks running on all apps.
|
||||
@override_settings(
|
||||
INSTALLED_APPS=[
|
||||
'django.contrib.auth',
|
||||
'django.contrib.contenttypes',
|
||||
'user_commands',
|
||||
],
|
||||
)
|
||||
class CommandTests(SimpleTestCase):
|
||||
def test_command(self):
|
||||
out = StringIO()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue