diff options
| author | Tim Graham <timograham@gmail.com> | 2018-12-21 12:10:47 -0500 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2018-12-21 12:45:02 -0500 |
| commit | 194a4b526ca3f1e1b13cf27f6ed9aeec3a2e9f89 (patch) | |
| tree | af1aeeb8b43d4018efb8e9ef22ab47cca42743d8 /tests/contenttypes_tests | |
| parent | 3defe76385ef5ce7558bad82e613318291e0a03c (diff) | |
Added tests for ContentType/Group/Permission.__str__().
Diffstat (limited to 'tests/contenttypes_tests')
| -rw-r--r-- | tests/contenttypes_tests/test_models.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/contenttypes_tests/test_models.py b/tests/contenttypes_tests/test_models.py index 84748a8878..0c263aabf0 100644 --- a/tests/contenttypes_tests/test_models.py +++ b/tests/contenttypes_tests/test_models.py @@ -199,6 +199,10 @@ class ContentTypesTests(TestCase): ct_fetched = ContentType.objects.get_for_id(ct.pk) self.assertIsNone(ct_fetched.model_class()) + def test_str(self): + ct = ContentType.objects.get(app_label='contenttypes_tests', model='site') + self.assertEqual(str(ct), 'site') + class TestRouter: def db_for_read(self, model, **hints): |
