feat: show optional serivce description before payment

This commit is contained in:
3252a8
2026-05-20 21:55:22 +03:00
parent d8a1da1f13
commit 7521f89ffd
51 changed files with 1199 additions and 499 deletions
+16
View File
@@ -162,6 +162,22 @@ class SettingsTests(unittest.TestCase):
self.assertFalse(settings.SUPPORT_ADMIN_EMAIL_NOTIFICATIONS_ENABLED)
def test_subscription_purchase_description_is_localized_and_toggleable(self):
settings = Settings(
_env_file=None,
BOT_TOKEN="token",
POSTGRES_USER="app_user",
POSTGRES_PASSWORD="app_password",
SUBSCRIPTION_PURCHASE_DESCRIPTION_RU="Русский текст",
SUBSCRIPTION_PURCHASE_DESCRIPTION_EN="English text",
)
self.assertEqual(settings.subscription_purchase_description("ru"), "Русский текст")
self.assertEqual(settings.subscription_purchase_description("en"), "English text")
settings.SUBSCRIPTION_PURCHASE_DESCRIPTION_ENABLED = False
self.assertEqual(settings.subscription_purchase_description("ru"), "")
def test_payment_button_presentation_env_values_are_available(self):
"""Presentation overrides now live on each provider's BaseSettings
model instead of the central Settings — verify they're loaded from