summaryrefslogtreecommitdiff
path: root/tests/contenttypes_tests
diff options
context:
space:
mode:
authorHrushikesh Vaidya <hrushikeshrv@gmail.com>2022-09-13 19:00:57 +0530
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2023-03-09 10:27:08 +0100
commita52bdea5a27ba44b13eda93642231c65c581e083 (patch)
tree955f1f934ab033d4e59b667b7520ddcdbf4fec66 /tests/contenttypes_tests
parent18473004afd82a616ba6c9ac22f476347fde4846 (diff)
downloaddjango-a52bdea5a27ba44b13eda93642231c65c581e083.tar.gz
Fixed #33985 -- Used app_config.verbose_name in ContentType.__str__().
Diffstat (limited to 'tests/contenttypes_tests')
-rw-r--r--tests/contenttypes_tests/test_models.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/contenttypes_tests/test_models.py b/tests/contenttypes_tests/test_models.py
index 2b346b0e44..95518bb3df 100644
--- a/tests/contenttypes_tests/test_models.py
+++ b/tests/contenttypes_tests/test_models.py
@@ -280,7 +280,11 @@ class ContentTypesTests(TestCase):
def test_str(self):
ct = ContentType.objects.get(app_label="contenttypes_tests", model="site")
- self.assertEqual(str(ct), "contenttypes_tests | site")
+ self.assertEqual(str(ct), "Contenttypes_Tests | site")
+
+ def test_str_auth(self):
+ ct = ContentType.objects.get(app_label="auth", model="group")
+ self.assertEqual(str(ct), "Authentication and Authorization | group")
def test_name(self):
ct = ContentType.objects.get(app_label="contenttypes_tests", model="site")
@@ -288,7 +292,7 @@ class ContentTypesTests(TestCase):
def test_app_labeled_name(self):
ct = ContentType.objects.get(app_label="contenttypes_tests", model="site")
- self.assertEqual(ct.app_labeled_name, "contenttypes_tests | site")
+ self.assertEqual(ct.app_labeled_name, "Contenttypes_Tests | site")
def test_name_unknown_model(self):
ct = ContentType(app_label="contenttypes_tests", model="unknown")