From 9c19aff7c7561e3a82978a272ecdaad40dda5c00 Mon Sep 17 00:00:00 2001 From: django-bot Date: Thu, 3 Feb 2022 20:24:19 +0100 Subject: Refs #33476 -- Reformatted code with Black. --- tests/proxy_model_inheritance/models.py | 1 - tests/proxy_model_inheritance/tests.py | 11 +++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) (limited to 'tests/proxy_model_inheritance') diff --git a/tests/proxy_model_inheritance/models.py b/tests/proxy_model_inheritance/models.py index 240fd60c4e..ae1d24228d 100644 --- a/tests/proxy_model_inheritance/models.py +++ b/tests/proxy_model_inheritance/models.py @@ -1,4 +1,3 @@ - from django.db import models 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 -- cgit v1.2.1