From 6b46762384150e18e932a4aaa56633146d156d28 Mon Sep 17 00:00:00 2001 From: Vishnu Ks Date: Mon, 7 Aug 2017 19:32:10 +0000 Subject: [PATCH] management: Fix typo in get_realm CommandError message. --- zerver/lib/management.py | 2 +- zerver/tests/test_management_commands.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/zerver/lib/management.py b/zerver/lib/management.py index e575685b15..41e56f934c 100644 --- a/zerver/lib/management.py +++ b/zerver/lib/management.py @@ -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): diff --git a/zerver/tests/test_management_commands.py b/zerver/tests/test_management_commands.py index 5a24ef5d65..1cda09b5fb 100644 --- a/zerver/tests/test_management_commands.py +++ b/zerver/tests/test_management_commands.py @@ -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):