summaryrefslogtreecommitdiff
path: root/tests/proxy_model_inheritance/tests.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/proxy_model_inheritance/tests.py')
-rw-r--r--tests/proxy_model_inheritance/tests.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/tests/proxy_model_inheritance/tests.py b/tests/proxy_model_inheritance/tests.py
index 9fb5f4e924..06756f7869 100644
--- a/tests/proxy_model_inheritance/tests.py
+++ b/tests/proxy_model_inheritance/tests.py
@@ -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