From a9e8c2e3bab60b4260cbf65da618e7f41916d995 Mon Sep 17 00:00:00 2001 From: admin Date: Fri, 30 Oct 2026 13:44:54 +0200 Subject: [PATCH] =?UTF-8?q?chore(subscription):=20reword=20expiry=20to=20'?= =?UTF-8?q?=D0=97=D0=B0=D0=BA=D0=BE=D0=BD=D1=87=D0=B8=D1=82=D1=81=D1=8F=20?= =?UTF-8?q?<=D0=B4=D0=B0=D1=82=D0=B0>=20=D0=B2=20<=D0=B2=D1=80=D0=B5=D0=BC?= =?UTF-8?q?=D1=8F>=20(=D0=9C=D0=A1=D0=9A)'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- VERSION | 2 +- tests/test_keyboards.py | 2 +- user_store.py | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/VERSION b/VERSION index c8308ef..1f44f48 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.1.0+82 +0.1.0+83 diff --git a/tests/test_keyboards.py b/tests/test_keyboards.py index f15f43b..49d5f6a 100644 --- a/tests/test_keyboards.py +++ b/tests/test_keyboards.py @@ -259,7 +259,7 @@ class ModeRoutingTests(unittest.IsolatedAsyncioTestCase): await bot._show_subscription_info(cast(Any, message), cast(Any, sub)) text = message.answers[0][0] self.assertIn("Подписка активна", text) - self.assertIn("Закончится в 31.10.2026 12:51 (МСК)", text) + self.assertIn("Закончится 31.10.2026 в 12:51 (МСК)", text) self.assertNotIn("ч.", text) async def test_subscription_action_button_shows_inline_plan_choices(self): diff --git a/user_store.py b/user_store.py index 98498a6..476db9a 100644 --- a/user_store.py +++ b/user_store.py @@ -219,7 +219,9 @@ def subscription_status_text( if not active: return "Подписка закончилась" if unit == "": - return f"Подписка активна\nЗакончится в {value}" + # value = "31.10.2026 13:32 (МСК)" -> "Закончится 31.10.2026 в 13:32 (МСК)". + date_part, _, rest = str(value).partition(" ") + return f"Подписка активна\nЗакончится {date_part} в {rest}" return f"Подписка активна\nЗакончится через {value} {unit}" def subscription_row(user_id: int, db_path: str | None = None) -> sqlite3.Row | None: