mirror of
https://github.com/django/django.git
synced 2025-11-01 12:25:37 +00:00
Fixed #25746 -- Isolated inlined test models registration.
Thanks to Tim for the review.
This commit is contained in:
parent
3096f4b082
commit
a08fda2111
29 changed files with 285 additions and 371 deletions
|
|
@ -3,9 +3,8 @@ from __future__ import unicode_literals
|
|||
|
||||
from django.core.checks import Error
|
||||
from django.db import connections, models
|
||||
from django.test import mock
|
||||
|
||||
from .base import IsolatedModelsTestCase
|
||||
from django.test import SimpleTestCase, mock
|
||||
from django.test.utils import isolate_apps
|
||||
|
||||
|
||||
def dummy_allow_migrate(db, app_label, **hints):
|
||||
|
|
@ -14,7 +13,8 @@ def dummy_allow_migrate(db, app_label, **hints):
|
|||
return db == 'default'
|
||||
|
||||
|
||||
class BackendSpecificChecksTests(IsolatedModelsTestCase):
|
||||
@isolate_apps('invalid_models_tests')
|
||||
class BackendSpecificChecksTests(SimpleTestCase):
|
||||
|
||||
@mock.patch('django.db.models.fields.router.allow_migrate', new=dummy_allow_migrate)
|
||||
def test_check_field(self):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue