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 20:47:15 +0200 |
commit | 7a9745fed498f69c46a3ffa5dfaff872e0e1df89 (patch) | |
tree | 7ebe98cb21ffdca2c48cd6c075e355ec00236ea1 /tests/check_framework | |
parent | 1697098795707bd39501d9ceddd3d9be93f8d549 (diff) | |
download | django-7a9745fed498f69c46a3ffa5dfaff872e0e1df89.tar.gz |
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.
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 5c62ace7e4..3a626038fd 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: |