diff options
| author | django-bot <ops@djangoproject.com> | 2022-02-08 12:09:55 +0100 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2022-02-08 12:15:38 +0100 |
| commit | 6a682b38e75d4c975b4c4493565a59f1bc14397c (patch) | |
| tree | 0bd9cda550bea26238656d9f120d769e8b41bb9e /tests/proxy_model_inheritance | |
| parent | e73ce08888e6f34d3f050377cfd2fbb733be94a9 (diff) | |
[4.0.x] Refs #33476 -- Reformatted code with Black.
Backport of 9c19aff7c7561e3a82978a272ecdaad40dda5c00 from main.
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 |
