This commit is contained in:
2026-07-09 16:45:17 +03:00
parent 5c7a9710f3
commit da24ed8ba7
23 changed files with 1542 additions and 358 deletions

View File

@@ -79,22 +79,3 @@ def test_payment_plans_are_parsed() -> None:
assert [plan.code for plan in plans] == ["30d", "180d", "365d"]
assert [plan.days for plan in plans] == [30, 180, 365]
assert [plan.amount_rub for plan in plans] == [250, 600, 1000]
def test_payment_product_plans_override_legacy_plans() -> None:
settings = Settings.model_construct(
payment_product_plans_raw="vpn_white:30:450,white:30:250,vpn:30:200",
payment_plans_raw="30:999",
payment_plan_duration_days=30,
)
plans = settings.payment_plans
assert [plan.code for plan in plans] == ["vpn_white", "white", "vpn"]
assert [plan.title for plan in plans] == ["VPN + Белые списки", "Белые списки", "VPN"]
assert [plan.amount_rub for plan in plans] == [450, 250, 200]
assert [plan.squad_groups for plan in plans] == [
("vpn", "white"),
("white",),
("vpn",),
]