tests: Remove most references to get_api_key.

This test helper doesn't really have value.
This commit is contained in:
Tim Abbott
2017-08-24 23:23:13 -07:00
parent e2ae096035
commit 7d08ff69f0
4 changed files with 10 additions and 11 deletions

View File

@@ -560,7 +560,7 @@ class WebhookTestCase(ZulipTestCase):
@property
def test_user(self):
# type: () -> UserProfile
return get_user_profile_by_email(self.TEST_USER_EMAIL)
return get_user(self.TEST_USER_EMAIL, get_realm("zulip"))
def setUp(self):
# type: () -> None
@@ -596,7 +596,7 @@ class WebhookTestCase(ZulipTestCase):
# type: (*Any, **Any) -> Text
url = self.URL_TEMPLATE
if url.find("api_key") >= 0:
api_key = self.get_api_key(self.TEST_USER_EMAIL)
api_key = self.test_user.api_key
url = self.URL_TEMPLATE.format(api_key=api_key,
stream=self.STREAM_NAME)
else: