From f90dad098b591a4c2e55ede3af6526c007de6229 Mon Sep 17 00:00:00 2001 From: Trygve Aaberge Date: Fri, 5 Jan 2024 17:31:35 +0100 Subject: Make URL format configurable --- tests/test_render_blocks.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'tests/test_render_blocks.py') diff --git a/tests/test_render_blocks.py b/tests/test_render_blocks.py index 6b1fc0f..63e4df5 100644 --- a/tests/test_render_blocks.py +++ b/tests/test_render_blocks.py @@ -4,6 +4,7 @@ from typing import TYPE_CHECKING, List import pytest +from slack.shared import shared from slack.slack_message import SlackMessage from tests.conftest import ( color_reset, @@ -128,7 +129,7 @@ cases: List[Case] = [ "normal <[color:bold]>*bold*<[color:-bold]> <[color:italic]>_italic_" "<[color:-italic]> ~strikethrough~ <[color:bold]><[color:italic]>" "*_~bold-italic-strikethrough~_*<[color:-italic]><[color:-bold]> " - "https://vg.no (link)", + "link (https://vg.no)", "1. number", "2. list", "> some quote", @@ -447,7 +448,8 @@ cases: List[Case] = [ @pytest.mark.parametrize("case", cases) -def test_unfurl_refs(case: Case, message1_in_channel_public: SlackMessage): +def test_render_blocks(case: Case, message1_in_channel_public: SlackMessage): + shared.config.look.render_url_as.value = "${text} (${url})" parsed = message1_in_channel_public._render_blocks( # pyright: ignore [reportPrivateUsage] case["blocks"] ) -- cgit