You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tooling.apache.org by sb...@apache.org on 2026/08/05 14:37:28 UTC
(tooling-trusted-releases) branch sbp updated: Fix the formatting of flash messages about announcing a vote
This is an automated email from the ASF dual-hosted git repository.
sbp pushed a commit to branch sbp
in repository https://gitbox.apache.org/repos/asf/tooling-trusted-releases.git
The following commit(s) were added to refs/heads/sbp by this push:
new 86adf827 Fix the formatting of flash messages about announcing a vote
86adf827 is described below
commit 86adf827d4ed07ad7f88a7041874c290449bf635
Author: Sean B. Palmer <se...@miscoranda.com>
AuthorDate: Wed Aug 5 15:37:03 2026 +0100
Fix the formatting of flash messages about announcing a vote
---
atr/post/vote.py | 2 +-
tests/unit/test_vote_serials.py | 6 +++++-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/atr/post/vote.py b/atr/post/vote.py
index 84f7c124..c11f39c4 100644
--- a/atr/post/vote.py
+++ b/atr/post/vote.py
@@ -102,6 +102,6 @@ async def selected_post( # noqa: C901
await quart.flash(error_message, "error")
return await session.redirect(get.vote.selected, project_key=str(project_key), version_key=str(version_key))
- success_message = f"Sending your vote to {email_to}."
+ success_message = f"Sending your vote to {', '.join(email_to)}."
await quart.flash(success_message, "success")
return await session.redirect(get.vote.selected, project_key=str(project_key), version_key=str(version_key))
diff --git a/tests/unit/test_vote_serials.py b/tests/unit/test_vote_serials.py
index 6a2a6eb5..194b96e6 100644
--- a/tests/unit/test_vote_serials.py
+++ b/tests/unit/test_vote_serials.py
@@ -413,7 +413,7 @@ async def test_podling_second_round_rolls_back_with_task_creation(sqlite_session
@pytest.mark.asyncio
async def test_post_vote_dispatches_trusted_email_manual_and_stale(monkeypatch) -> None:
trusted_cast = mock.AsyncMock(return_value=(["dev@project.apache.org"], ""))
- email_send = mock.AsyncMock(return_value=(["dev@project.apache.org"], ""))
+ email_send = mock.AsyncMock(return_value=(["dev@project.apache.org", "private@project.apache.org"], ""))
flash = mock.AsyncMock()
@contextlib.asynccontextmanager
@@ -457,6 +457,10 @@ async def test_post_vote_dispatches_trusted_email_manual_and_stale(monkeypatch)
assert result == "redirect"
trusted_cast.assert_not_awaited()
email_send.assert_awaited_once()
+ assert flash.call_args.args == (
+ "Sending your vote to dev@project.apache.org, private@project.apache.org.",
+ "success",
+ )
trusted_cast.reset_mock()
email_send.reset_mock()
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@tooling.apache.org
For additional commands, e-mail: commits-help@tooling.apache.org