tests: Remove unnecessary use of get_realm_by_email_domain.

That function was primarily intended for some limited registration
code paths, not the generic usage it was getting.
This commit is contained in:
Tim Abbott
2017-08-24 20:20:26 -07:00
parent 1c9521a8d6
commit 80458945c7
2 changed files with 6 additions and 8 deletions

View File

@@ -8,7 +8,7 @@ from typing import Any, Union, Mapping, Callable
from zerver.lib.actions import do_create_user
from zerver.lib.test_classes import ZulipTestCase
from zerver.models import (
get_realm_by_email_domain,
get_realm,
UserProfile,
Recipient,
)
@@ -25,14 +25,14 @@ class TestServiceBotEventTriggers(ZulipTestCase):
self.user_profile = self.example_user("othello")
self.bot_profile = do_create_user(email="foo-bot@zulip.com",
password="test",
realm=get_realm_by_email_domain("zulip.com"),
realm=get_realm("zulip"),
full_name="FooBot",
short_name="foo-bot",
bot_type=UserProfile.OUTGOING_WEBHOOK_BOT,
bot_owner=self.user_profile)
self.second_bot_profile = do_create_user(email="bar-bot@zulip.com",
password="test",
realm=get_realm_by_email_domain("zulip.com"),
realm=get_realm("zulip"),
full_name="BarBot",
short_name="bar-bot",
bot_type=UserProfile.OUTGOING_WEBHOOK_BOT,