mirror of
https://github.com/django/django.git
synced 2025-10-17 13:58:24 +00:00
Refs #33476 -- Reformatted code with Black.
This commit is contained in:
parent
f68fa8b45d
commit
9c19aff7c7
1992 changed files with 139577 additions and 96284 deletions
|
@ -5,7 +5,9 @@ from django.test import TestCase, TransactionTestCase
|
|||
from django.test.utils import extend_sys_path
|
||||
|
||||
from .models import (
|
||||
ConcreteModel, ConcreteModelSubclass, ConcreteModelSubclassProxy,
|
||||
ConcreteModel,
|
||||
ConcreteModelSubclass,
|
||||
ConcreteModelSubclassProxy,
|
||||
ProxyModel,
|
||||
)
|
||||
|
||||
|
@ -16,20 +18,21 @@ class ProxyModelInheritanceTests(TransactionTestCase):
|
|||
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 = []
|
||||
|
||||
def test_table_exists(self):
|
||||
with extend_sys_path(os.path.dirname(os.path.abspath(__file__))):
|
||||
with self.modify_settings(INSTALLED_APPS={'append': ['app1', 'app2']}):
|
||||
call_command('migrate', verbosity=0, run_syncdb=True)
|
||||
with self.modify_settings(INSTALLED_APPS={"append": ["app1", "app2"]}):
|
||||
call_command("migrate", verbosity=0, run_syncdb=True)
|
||||
from app1.models import ProxyModel
|
||||
from app2.models import NiceModel
|
||||
|
||||
self.assertEqual(NiceModel.objects.all().count(), 0)
|
||||
self.assertEqual(ProxyModel.objects.all().count(), 0)
|
||||
|
||||
|
||||
class MultiTableInheritanceProxyTest(TestCase):
|
||||
|
||||
def test_model_subclass_proxy(self):
|
||||
"""
|
||||
Deleting an instance of a model proxying a multi-table inherited
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue