diff options
author | Jon Dufresne <jon.dufresne@gmail.com> | 2018-07-10 05:23:43 -0700 |
---|---|---|
committer | Tim Graham <timograham@gmail.com> | 2018-07-10 10:14:34 -0400 |
commit | 08ebed5e7975b2b735ab8ec0384ccb8e31b76056 (patch) | |
tree | d9809cfa6779e3d6db89aae884ddb584a9bf6422 /tests/contenttypes_tests | |
parent | 178624855a3a0f9b4a79a1e33a9d298df179c71e (diff) | |
download | django-08ebed5e7975b2b735ab8ec0384ccb8e31b76056.tar.gz |
Fixed #29556 -- Made 'remove_stale_contenttypes --noinput' delete content types.
Diffstat (limited to 'tests/contenttypes_tests')
-rw-r--r-- | tests/contenttypes_tests/test_management.py | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/tests/contenttypes_tests/test_management.py b/tests/contenttypes_tests/test_management.py index fa80c843d7..3e375518c9 100644 --- a/tests/contenttypes_tests/test_management.py +++ b/tests/contenttypes_tests/test_management.py @@ -52,14 +52,11 @@ class RemoveStaleContentTypesTests(TestCase): self.assertEqual(ContentType.objects.count(), self.before_count) def test_interactive_false(self): - """ - non-interactive mode of remove_stale_contenttypes doesn't delete - stale content types. - """ + """non-interactive mode deletes stale content types.""" with captured_stdout() as stdout: call_command('remove_stale_contenttypes', interactive=False, verbosity=2) - self.assertIn("Stale content types remain.", stdout.getvalue()) - self.assertEqual(ContentType.objects.count(), self.before_count + 1) + self.assertIn('Deleting stale content type', stdout.getvalue()) + self.assertEqual(ContentType.objects.count(), self.before_count) def test_unavailable_content_type_model(self): """A ContentType isn't created if the model isn't available.""" |