diff options
| author | Hasan Ramezani <hasan.r67@gmail.com> | 2021-06-21 16:57:06 +0200 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2021-06-22 21:19:47 +0200 |
| commit | 8b2b627f34797b8d497451350b35d7a5103b016e (patch) | |
| tree | aefdc12bbef5e5f693fa48956070b4c5c80bda87 /tests/check_framework | |
| parent | fb577d85b24470b61fb10857744614af054d53dc (diff) | |
[3.2.x] Fixed #32863 -- Skipped system check for specifying type of auto-created primary keys on models with invalid app_label.
Regression in b5e12d490af3debca8c55ab3c1698189fdedbbdb.
Thanks Iuri de Silvio for the report.
Backport of 7a9745fed498f69c46a3ffa5dfaff872e0e1df89 from main
Diffstat (limited to 'tests/check_framework')
| -rw-r--r-- | tests/check_framework/test_model_checks.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/check_framework/test_model_checks.py b/tests/check_framework/test_model_checks.py index c26cf53903..90af4c9489 100644 --- a/tests/check_framework/test_model_checks.py +++ b/tests/check_framework/test_model_checks.py @@ -403,6 +403,13 @@ class ModelDefaultAutoFieldTests(SimpleTestCase): self.assertEqual(checks.run_checks(app_configs=self.apps.get_app_configs()), []) + def test_skipped_on_model_with_invalid_app_label(self): + class Model(models.Model): + class Meta: + app_label = 'invalid_app_label' + + self.assertEqual(Model.check(), []) + def test_skipped_on_abstract_model(self): class Abstract(models.Model): class Meta: |
