mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 13:03:29 +00:00
integrations: Split the getters for fixture_path and image_path.
This is in preparation of adding support for generating screenshots of fixtureless integrations, which would need to get image_path, without involving fixture_path.
This commit is contained in:
@@ -42,7 +42,8 @@ from zerver.lib.integrations import (
|
||||
Integration,
|
||||
WebhookIntegration,
|
||||
WebhookScreenshotConfig,
|
||||
get_fixture_and_image_paths,
|
||||
get_fixture_path,
|
||||
get_image_path,
|
||||
split_fixture_path,
|
||||
)
|
||||
from zerver.lib.storage import static_path
|
||||
@@ -220,7 +221,8 @@ def generate_screenshot_from_config(
|
||||
) -> None:
|
||||
integration = INTEGRATIONS[integration_name]
|
||||
assert isinstance(integration, WebhookIntegration)
|
||||
fixture_path, image_path = get_fixture_and_image_paths(integration, screenshot_config)
|
||||
fixture_path = get_fixture_path(integration, screenshot_config)
|
||||
image_path = get_image_path(integration, screenshot_config)
|
||||
bot = create_integration_bot(integration, screenshot_config.bot_name)
|
||||
create_integration_stream(integration, bot)
|
||||
if send_bot_payload_message(bot, integration, fixture_path, screenshot_config):
|
||||
|
||||
Reference in New Issue
Block a user