diff options
Diffstat (limited to 'tests/contenttypes_tests')
| -rw-r--r-- | tests/contenttypes_tests/test_checks.py | 2 | ||||
| -rw-r--r-- | tests/contenttypes_tests/test_management.py | 7 |
2 files changed, 9 insertions, 0 deletions
diff --git a/tests/contenttypes_tests/test_checks.py b/tests/contenttypes_tests/test_checks.py index bd36c569a1..50730c5a1d 100644 --- a/tests/contenttypes_tests/test_checks.py +++ b/tests/contenttypes_tests/test_checks.py @@ -11,6 +11,8 @@ from django.test.utils import isolate_apps @isolate_apps("contenttypes_tests", attr_name="apps") class GenericForeignKeyTests(SimpleTestCase): + databases = "__all__" + def test_missing_content_type_field(self): class TaggedItem(models.Model): # no content_type field diff --git a/tests/contenttypes_tests/test_management.py b/tests/contenttypes_tests/test_management.py index d5e14c7df3..eb472d80ce 100644 --- a/tests/contenttypes_tests/test_management.py +++ b/tests/contenttypes_tests/test_management.py @@ -22,6 +22,13 @@ class RemoveStaleContentTypesTests(TestCase): @classmethod def setUpTestData(cls): + with captured_stdout(): + call_command( + "remove_stale_contenttypes", + interactive=False, + include_stale_apps=True, + verbosity=2, + ) cls.before_count = ContentType.objects.count() cls.content_type = ContentType.objects.create( app_label="contenttypes_tests", model="Fake" |
