DashboardsentryStripe Projects tests need Stripe custo…

Stripe Projects tests need Stripe customer mock after billing auto-provisioning

Category: pattern
Confidence: 1.00
ID: 019d9db2-9bf9-719f-a317-7241224450bc
Project ID: 702228c8-56bc-4694-8d5a-174ac2f29105
Cross-project: No
Recalled in other projects: 0
Source session: (none)
Created: 2026-07-30 15:46:04
Updated: 2026-07-30 15:46:04

Content

Stripe Projects test patterns: (1) Control tests with cell models: assume_test_silo_mode(SiloMode.REGION) + @control_silo_test(cells=create_test_cells('us')). (2) Mock Stripe customer: standalone_subscription_options creates customer via outbox — tests need @responses.activate with POST https://api.stripe.com/v1/customers returning {"id": "cus_test_xxx", "object": "customer"} before org creation. (3) HMAC: dev.py uses different secret — test classes using sign_request need @override_settings(STRIPE_PROJECTS_HMAC_SECRET=HMAC_SECRET).

Move to: