'Ensure that the operation is aborted if the username matches an
existing user account but the supplied email doesn\'t match.'

def test_wrong_email(self):

    User.objects.create(username=TEST_USERNAME, email=TEST_EMAIL)
    with self.assertRaises(CommandError) as exc_context:
        call_command('manage_user', TEST_USERNAME, 'other@example.com')
    self.assertIn('email    addresses    do    not    match', str(exc_context.exception).lower())
    self.assertEqual([(TEST_USERNAME, TEST_EMAIL)], [(u.username, u.email) for u in User.objects.all()])
    with self.assertRaises(CommandError) as exc_context:
        call_command('manage_user', TEST_USERNAME, 'other@example.com', '--remove')
    self.assertIn('email    addresses    do    not    match', str(exc_context.exception).lower())
    self.assertEqual([(TEST_USERNAME, TEST_EMAIL)], [(u.username, u.email) for u in User.objects.all()])
