diff options
author | django-bot <ops@djangoproject.com> | 2022-02-03 20:24:19 +0100 |
---|---|---|
committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2022-02-07 20:37:05 +0100 |
commit | 9c19aff7c7561e3a82978a272ecdaad40dda5c00 (patch) | |
tree | f0506b668a013d0063e5fba3dbf4863b466713ba /tests/proxy_model_inheritance | |
parent | f68fa8b45dfac545cfc4111d4e52804c86db68d3 (diff) | |
download | django-9c19aff7c7561e3a82978a272ecdaad40dda5c00.tar.gz |
Refs #33476 -- Reformatted code with Black.
Diffstat (limited to 'tests/proxy_model_inheritance')
-rw-r--r-- | tests/proxy_model_inheritance/models.py | 1 | ||||
-rw-r--r-- | tests/proxy_model_inheritance/tests.py | 11 |
2 files changed, 7 insertions, 5 deletions
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 |