feat(subscription): add expiry recovery flow

This commit is contained in:
chengma
2026-07-23 16:03:08 +08:00
parent b05c370250
commit c02866e610
7 changed files with 276 additions and 17 deletions
+5
View File
@@ -90,11 +90,16 @@ class SubscriptionTests(TempDirMixin, unittest.TestCase):
"plan": {"display_name": "专业版"},
"status": "expired",
"expires_at": "2026-08-20T23:59:59+08:00",
"manage_url": "https://cm.example.com/user/subscriptions/cmshopee",
}
expired = subscription.check_status(config, request_json=expired_request)
self.assertEqual(subscription.STATUS_EXPIRED, expired.state)
self.assertFalse(expired.allows_product_workflows)
self.assertEqual(
"https://cm.example.com/user/subscriptions/cmshopee",
expired.manage_url,
)
def test_legacy_404_keeps_existing_workflows_available(self):
with self.make_temp_dir() as temp_dir: