diff --git a/server/exceptions.py b/server/exceptions.py index 5c5a103d6..48095d2a4 100644 --- a/server/exceptions.py +++ b/server/exceptions.py @@ -34,7 +34,9 @@ def __init__(self, ban_expiry, ban_reason, *args, **kwargs): def message(self): return ( f"You are banned from FAF {self._ban_duration_text()}.
" - f"Reason:
{self.ban_reason}" + f"Reason:
{self.ban_reason}

" + "If you would like to appeal this ban, please send an email to: " + "moderation@faforever.com" ) def _ban_duration_text(self): diff --git a/tests/integration_tests/test_login.py b/tests/integration_tests/test_login.py index ade081f7d..f7b9cbc91 100644 --- a/tests/integration_tests/test_login.py +++ b/tests/integration_tests/test_login.py @@ -39,7 +39,11 @@ async def test_server_ban(lobby_server, user): assert msg == { "command": "notice", "style": "error", - "text": "You are banned from FAF forever.
Reason:
Test permanent ban" + "text": ( + "You are banned from FAF forever.
Reason:
Test permanent ban" + "

If you would like to appeal this ban, please send an " + "email to: moderation@faforever.com" + ) } diff --git a/tests/integration_tests/test_server.py b/tests/integration_tests/test_server.py index a1199e2d9..3f2fe7a7b 100644 --- a/tests/integration_tests/test_server.py +++ b/tests/integration_tests/test_server.py @@ -793,7 +793,11 @@ async def test_server_ban_prevents_hosting(lobby_server, database, command): assert msg == { "command": "notice", "style": "error", - "text": "You are banned from FAF forever.
Reason:
Test live ban" + "text": ( + "You are banned from FAF forever.
Reason:
Test live ban
" + "
If you would like to appeal this ban, please send an email " + "to: moderation@faforever.com" + ) } diff --git a/tests/unit_tests/test_lobbyconnection.py b/tests/unit_tests/test_lobbyconnection.py index 61af68d68..48e812ecc 100644 --- a/tests/unit_tests/test_lobbyconnection.py +++ b/tests/unit_tests/test_lobbyconnection.py @@ -1076,8 +1076,11 @@ async def test_abort_connection_if_banned( lobbyconnection.player.id = 203 with pytest.raises(BanError) as banned_error: await lobbyconnection.abort_connection_if_banned() - assert banned_error.value.message() == \ + assert banned_error.value.message() == ( "You are banned from FAF forever.
Reason:
Test permanent ban" + "

If you would like to appeal this ban, please send an email " + "to: moderation@faforever.com" + ) # test user who is banned for another 46 hours lobbyconnection.player.id = 204