summaryrefslogtreecommitdiff
path: root/tests/contenttypes_tests
diff options
context:
space:
mode:
authorClaude Paroz <claude@2xlibre.net>2017-01-07 12:11:46 +0100
committerClaude Paroz <claude@2xlibre.net>2017-01-18 21:33:28 +0100
commit2b281cc35ed9d997614ca3c416928d7fabfef1ad (patch)
treed3e73cf44b15139aa9f1f53e398942ba64f5e190 /tests/contenttypes_tests
parent7b2f2e74adb36a4334e83130f6abc2f79d395235 (diff)
downloaddjango-2b281cc35ed9d997614ca3c416928d7fabfef1ad.tar.gz
Refs #23919 -- Removed most of remaining six usage
Thanks Tim Graham for the review.
Diffstat (limited to 'tests/contenttypes_tests')
-rw-r--r--tests/contenttypes_tests/tests.py10
1 files changed, 2 insertions, 8 deletions
diff --git a/tests/contenttypes_tests/tests.py b/tests/contenttypes_tests/tests.py
index a46c9f3365..c91c265eaf 100644
--- a/tests/contenttypes_tests/tests.py
+++ b/tests/contenttypes_tests/tests.py
@@ -390,10 +390,7 @@ class UpdateContentTypesTests(TestCase):
# A related object is needed to show that a custom collector with
# can_fast_delete=False is needed.
ModelWithNullFKToSite.objects.create(post=post)
- with mock.patch(
- 'django.contrib.contenttypes.management.commands.remove_stale_contenttypes.input',
- return_value='yes'
- ):
+ with mock.patch('builtins.input', return_value='yes'):
with captured_stdout() as stdout:
call_command('remove_stale_contenttypes', verbosity=2, stdout=stdout)
self.assertEqual(Post.objects.count(), 0)
@@ -409,10 +406,7 @@ class UpdateContentTypesTests(TestCase):
interactive mode of remove_stale_contenttypes (the default) should
delete stale contenttypes even if there aren't any dependent objects.
"""
- with mock.patch(
- 'django.contrib.contenttypes.management.commands.remove_stale_contenttypes.input',
- return_value='yes'
- ):
+ with mock.patch('builtins.input', return_value='yes'):
with captured_stdout() as stdout:
call_command('remove_stale_contenttypes', verbosity=2)
self.assertIn("Deleting stale content type", stdout.getvalue())