diff options
author | David Smith <smithdc@gmail.com> | 2022-02-12 20:40:12 +0000 |
---|---|---|
committer | Carlton Gibson <carlton@noumenal.es> | 2022-03-15 16:23:55 +0100 |
commit | 3b3f38b3b09b0f2373e51406ecb8c9c45d36aebc (patch) | |
tree | 8ab2c436451318223606470fcdc23b6dc690da20 /tests/contenttypes_tests | |
parent | 3eaba13a476c14b75429ba34180184b81997b33a (diff) | |
download | django-3b3f38b3b09b0f2373e51406ecb8c9c45d36aebc.tar.gz |
Fixed #31169 -- Adapted the parallel test runner to use spawn.
Co-authored-by: Valz <ahmadahussein0@gmail.com>
Co-authored-by: Nick Pope <nick@nickpope.me.uk>
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" |