fix: configure referral bonuses per tariff period

This commit is contained in:
3252a8
2026-05-29 22:30:31 +03:00
parent cab963dcdc
commit 6803c7801f
23 changed files with 604 additions and 90 deletions
+14
View File
@@ -42,6 +42,20 @@ class SettingsTests(unittest.TestCase):
self.assertEqual(settings.WEBAPP_TITLE, "/minishop")
def test_legacy_subscription_prices_have_defaults(self):
settings = Settings(
_env_file=None,
BOT_TOKEN="token",
POSTGRES_USER="app_user",
POSTGRES_PASSWORD="app_password",
TARIFFS_CONFIG_PATH="missing-tariffs.json",
)
self.assertEqual(
settings.subscription_options,
{1: 200.0, 3: 600.0, 6: 1200.0, 12: 2400.0},
)
def test_subscription_guides_defaults_are_enabled(self):
settings = Settings(
_env_file=None,