diff options
| author | François Freitag <mail@franek.fr> | 2020-04-18 12:27:43 +0200 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2020-04-20 09:09:26 +0200 |
| commit | c86201b6ed4f8256b0a0520c08aa674f623d4127 (patch) | |
| tree | 27448bbd6462d6afcb61d9a7dd8f667a9cd7ec38 /tests/auth_tests/test_management.py | |
| parent | 45e96b4d9d30ba470333b1e33b21df560ba41705 (diff) | |
Disabled management commands output with verbosity 0 in various tests.
Instead of capturing the command output and discard it immediately,
tell the command not to log.
Diffstat (limited to 'tests/auth_tests/test_management.py')
| -rw-r--r-- | tests/auth_tests/test_management.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/auth_tests/test_management.py b/tests/auth_tests/test_management.py index fa2fc93fd6..8b2d9775a2 100644 --- a/tests/auth_tests/test_management.py +++ b/tests/auth_tests/test_management.py @@ -990,7 +990,7 @@ class CreatesuperuserManagementCommandTestCase(TestCase): 'DJANGO_SUPERUSER_FIRST_NAME': 'ignored_first_name', }) def test_environment_variable_non_interactive(self): - call_command('createsuperuser', interactive=False, stdout=StringIO()) + call_command('createsuperuser', interactive=False, verbosity=0) user = User.objects.get(username='test_superuser') self.assertEqual(user.email, 'joe@somewhere.org') self.assertTrue(user.check_password('test_password')) @@ -1009,7 +1009,7 @@ class CreatesuperuserManagementCommandTestCase(TestCase): interactive=False, username='cmd_superuser', email='cmd@somewhere.org', - stdout=StringIO(), + verbosity=0, ) user = User.objects.get(username='cmd_superuser') self.assertEqual(user.email, 'cmd@somewhere.org') @@ -1030,7 +1030,7 @@ class CreatesuperuserManagementCommandTestCase(TestCase): username='cmd_superuser', email='cmd@somewhere.org', stdin=MockTTY(), - stdout=StringIO(), + verbosity=0, ) user = User.objects.get(username='cmd_superuser') self.assertEqual(user.email, 'cmd@somewhere.org') |
