management: Fix typo in get_realm CommandError message.

This commit is contained in:
Vishnu Ks 2017-08-07 19:32:10 +00:00 committed by Tim Abbott
parent 27936fcfd4
commit 6b46762384
2 changed files with 3 additions and 3 deletions

View File

@ -45,7 +45,7 @@ You can use the command list_realms to find ID of the realms in this server."""
return Realm.objects.get(id=val)
return Realm.objects.get(string_id=val)
except Realm.DoesNotExist:
raise CommandError("The is no realm with id '%s'. Aborting." %
raise CommandError("There is no realm with id '%s'. Aborting." %
(options["realm_id"],))
def get_user(self, email, realm):

View File

@ -23,9 +23,9 @@ class TestZulipBaseCommand(ZulipTestCase):
self.assertEqual(command.get_realm(dict(realm_id='zulip')), get_realm("zulip"))
self.assertEqual(command.get_realm(dict(realm_id=None)), None)
self.assertEqual(command.get_realm(dict(realm_id='1')), get_realm("zulip"))
with self.assertRaisesRegex(CommandError, "The is no realm with id"):
with self.assertRaisesRegex(CommandError, "There is no realm with id"):
command.get_realm(dict(realm_id='17'))
with self.assertRaisesRegex(CommandError, "The is no realm with id"):
with self.assertRaisesRegex(CommandError, "There is no realm with id"):
command.get_realm(dict(realm_id='mit'))
def test_get_user(self):