'A Custom superuser won\'t be created when a required field isn\'t provided'

@override_settings(AUTH_USER_MODEL='auth_tests.CustomUser')
def test_swappable_user_missing_required_field(self):

    new_io = StringIO()
    with self.assertRaisesMessage(CommandError, 'You    must    use    --email    with    --noinput.'):
        call_command('createsuperuser', interactive=False, stdout=new_io, stderr=new_io)
    self.assertEqual(CustomUser._default_manager.count(), 0)
