mirror of
https://github.com/django/django.git
synced 2025-08-03 18:38:50 +00:00
Improved set_available_apps() in several ways.
- Tested consistency the current app_configs instead of INSTALLED_APPS. - Considered applications added with _with_app as available. - Added docstrings.
This commit is contained in:
parent
2239081ff1
commit
16aae35ca8
2 changed files with 19 additions and 5 deletions
|
@ -6,22 +6,19 @@ import sys
|
|||
from django.core.apps import app_cache
|
||||
from django.core.management import call_command
|
||||
from django.test import TestCase, TransactionTestCase
|
||||
from django.test.utils import override_settings
|
||||
from django.utils._os import upath
|
||||
|
||||
from .models import (ConcreteModel, ConcreteModelSubclass,
|
||||
ConcreteModelSubclassProxy)
|
||||
|
||||
|
||||
# Required for available_apps.
|
||||
@override_settings(INSTALLED_APPS=['app1', 'app2'])
|
||||
class ProxyModelInheritanceTests(TransactionTestCase):
|
||||
"""
|
||||
Proxy model inheritance across apps can result in migrate not creating the table
|
||||
for the proxied model (as described in #12286). This test creates two dummy
|
||||
apps and calls migrate, then verifies that the table has been created.
|
||||
"""
|
||||
available_apps = ['app1', 'app2']
|
||||
available_apps = []
|
||||
|
||||
def setUp(self):
|
||||
self.old_sys_path = sys.path[:]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue