thunderbird_accounts.subscription.management.commands.create_active_subscription_for_e2e_test
Bootstrap an active Subscription for an e2e test account.
Classes
|
Used for e2e tests that need to traverse routes the Vue router gates behind an active subscription (e.g. |
- class thunderbird_accounts.subscription.management.commands.create_active_subscription_for_e2e_test.Command(stdout=None, stderr=None, no_color=False, force_color=False)[source]
Bases:
BaseCommandUsed for e2e tests that need to traverse routes the Vue router gates behind an active subscription (e.g.
/manage-mfa). Idempotent — safe to run more than once.Looks up the Keycloak user by username so the Django
Userrow carries the matchingoidc_id; otherwise mozilla-django-oidc would create a duplicate user on first sign-in.Usage:
python manage.py create_active_subscription_for_e2e_test admin@example.org