users: Remove unnecessary get_api_key helper.

Using the column name is clearer.
This commit is contained in:
Alex Vandiver
2025-02-11 21:46:45 +00:00
committed by Tim Abbott
parent 8804c1afaa
commit a7d513e5ec
18 changed files with 37 additions and 55 deletions

View File

@@ -11,7 +11,6 @@ from zerver.lib.exceptions import InvalidJSONError, JsonableError
from zerver.lib.send_email import FromAddress
from zerver.lib.test_classes import WebhookTestCase, ZulipTestCase
from zerver.lib.test_helpers import HostRequestMock
from zerver.lib.users import get_api_key
from zerver.lib.webhooks.common import (
INVALID_JSON_MESSAGE,
MISSING_EVENT_HEADER_MESSAGE,
@@ -74,7 +73,7 @@ class WebhooksCommonTestCase(ZulipTestCase):
webhook_bot_email = "webhook-bot@zulip.com"
webhook_bot_realm = get_realm("zulip")
webhook_bot = get_user(webhook_bot_email, webhook_bot_realm)
webhook_bot_api_key = get_api_key(webhook_bot)
webhook_bot_api_key = webhook_bot.api_key
request = HostRequestMock()
request.POST["api_key"] = webhook_bot_api_key
request.host = "zulip.testserver"