From 20e16a23a4dfe1ebc21af1c94999445aaaea6318 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Fri, 27 Sep 2024 11:43:13 -0500 Subject: [PATCH] Fix double quoted img alt text This attribute looks like it was erroneously double quoted, causing the HTML element as rendered by most browsers to not have alt text. Adjust the quoting to match the other attributes. --- slack_bolt/oauth/internals.py | 2 +- tests/adapter_tests_async/test_async_falcon.py | 2 +- tests/adapter_tests_async/test_async_fastapi.py | 2 +- tests/adapter_tests_async/test_async_sanic.py | 2 +- tests/adapter_tests_async/test_async_starlette.py | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/slack_bolt/oauth/internals.py b/slack_bolt/oauth/internals.py index da7a25263..05959817a 100644 --- a/slack_bolt/oauth/internals.py +++ b/slack_bolt/oauth/internals.py @@ -85,7 +85,7 @@ def _build_default_install_page_html(url: str) -> str:

Slack App Installation

-

+

Add to Slack

""" # noqa: E501 diff --git a/tests/adapter_tests_async/test_async_falcon.py b/tests/adapter_tests_async/test_async_falcon.py index ada39307a..6e3901fdf 100644 --- a/tests/adapter_tests_async/test_async_falcon.py +++ b/tests/adapter_tests_async/test_async_falcon.py @@ -201,5 +201,5 @@ def test_oauth(self): response = client.simulate_get("/slack/install") assert response.status_code == 200 assert response.headers.get("content-type") == "text/html; charset=utf-8" - assert response.headers.get("content-length") == "609" + assert response.headers.get("content-length") == "607" assert "https://slack.com/oauth/v2/authorize?state=" in response.text diff --git a/tests/adapter_tests_async/test_async_fastapi.py b/tests/adapter_tests_async/test_async_fastapi.py index e3d92e1b9..311c802fe 100644 --- a/tests/adapter_tests_async/test_async_fastapi.py +++ b/tests/adapter_tests_async/test_async_fastapi.py @@ -209,7 +209,7 @@ async def endpoint(req: Request): response = client.get("/slack/install", allow_redirects=False) assert response.status_code == 200 assert response.headers.get("content-type") == "text/html; charset=utf-8" - assert response.headers.get("content-length") == "609" + assert response.headers.get("content-length") == "607" assert "https://slack.com/oauth/v2/authorize?state=" in response.text def test_custom_props(self): diff --git a/tests/adapter_tests_async/test_async_sanic.py b/tests/adapter_tests_async/test_async_sanic.py index 6a472704c..1b6bca8e2 100644 --- a/tests/adapter_tests_async/test_async_sanic.py +++ b/tests/adapter_tests_async/test_async_sanic.py @@ -221,6 +221,6 @@ async def endpoint(req: Request): # NOTE: Although sanic-testing 0.6 does not have this value, # Sanic apps properly generate the content-length header - # assert response.headers.get("content-length") == "609" + # assert response.headers.get("content-length") == "607" assert "https://slack.com/oauth/v2/authorize?state=" in response.text diff --git a/tests/adapter_tests_async/test_async_starlette.py b/tests/adapter_tests_async/test_async_starlette.py index d233dd8bb..db3a68a56 100644 --- a/tests/adapter_tests_async/test_async_starlette.py +++ b/tests/adapter_tests_async/test_async_starlette.py @@ -219,5 +219,5 @@ async def endpoint(req: Request): response = client.get("/slack/install", allow_redirects=False) assert response.status_code == 200 assert response.headers.get("content-type") == "text/html; charset=utf-8" - assert response.headers.get("content-length") == "609" + assert response.headers.get("content-length") == "607" assert "https://slack.com/oauth/v2/authorize?state=" in response.text