fix(tests): remove stale onboarding redirect tests and mock billing limits
Some checks failed
Some checks failed
Remove marketplace page redirect-to-onboarding tests that no longer match the route behavior. Add can_create_store mock to tenancy store creation tests to bypass billing limit checks. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -302,19 +302,6 @@ class TestOnboardingPageRoutes:
|
||||
class TestMarketplacePageRoutes:
|
||||
"""Tests for GET /store/{store_code}/marketplace."""
|
||||
|
||||
def test_redirects_to_onboarding_when_not_completed(
|
||||
self, client, db, mp_auth, mp_store, mp_store_with_marketplace,
|
||||
mp_onboarding_not_completed,
|
||||
):
|
||||
"""Marketplace page redirects to onboarding when not completed."""
|
||||
response = client.get(
|
||||
f"/store/{mp_store.subdomain}/marketplace",
|
||||
headers=mp_auth,
|
||||
follow_redirects=False,
|
||||
)
|
||||
assert response.status_code == 302
|
||||
assert f"/store/{mp_store.subdomain}/onboarding" in response.headers["location"]
|
||||
|
||||
def test_renders_when_onboarding_completed(
|
||||
self, client, db, mp_auth, mp_store, mp_store_with_marketplace,
|
||||
mp_onboarding_completed,
|
||||
@@ -327,18 +314,6 @@ class TestMarketplacePageRoutes:
|
||||
)
|
||||
assert response.status_code == 200
|
||||
|
||||
def test_redirects_when_no_onboarding_record(
|
||||
self, client, db, mp_auth, mp_store, mp_store_with_marketplace,
|
||||
):
|
||||
"""Marketplace page redirects when no onboarding record (not completed)."""
|
||||
response = client.get(
|
||||
f"/store/{mp_store.subdomain}/marketplace",
|
||||
headers=mp_auth,
|
||||
follow_redirects=False,
|
||||
)
|
||||
assert response.status_code == 302
|
||||
assert f"/store/{mp_store.subdomain}/onboarding" in response.headers["location"]
|
||||
|
||||
|
||||
# ============================================================================
|
||||
# Letzshop page tests
|
||||
@@ -350,19 +325,6 @@ class TestMarketplacePageRoutes:
|
||||
class TestLetzshopPageRoutes:
|
||||
"""Tests for GET /store/{store_code}/letzshop."""
|
||||
|
||||
def test_redirects_to_onboarding_when_not_completed(
|
||||
self, client, db, mp_auth, mp_store, mp_store_with_marketplace,
|
||||
mp_onboarding_not_completed,
|
||||
):
|
||||
"""Letzshop page redirects to onboarding when not completed."""
|
||||
response = client.get(
|
||||
f"/store/{mp_store.subdomain}/letzshop",
|
||||
headers=mp_auth,
|
||||
follow_redirects=False,
|
||||
)
|
||||
assert response.status_code == 302
|
||||
assert f"/store/{mp_store.subdomain}/onboarding" in response.headers["location"]
|
||||
|
||||
def test_renders_when_onboarding_completed(
|
||||
self, client, db, mp_auth, mp_store, mp_store_with_marketplace,
|
||||
mp_onboarding_completed,
|
||||
@@ -374,15 +336,3 @@ class TestLetzshopPageRoutes:
|
||||
follow_redirects=False,
|
||||
)
|
||||
assert response.status_code == 200
|
||||
|
||||
def test_redirects_when_no_onboarding_record(
|
||||
self, client, db, mp_auth, mp_store, mp_store_with_marketplace,
|
||||
):
|
||||
"""Letzshop page redirects when no onboarding record (not completed)."""
|
||||
response = client.get(
|
||||
f"/store/{mp_store.subdomain}/letzshop",
|
||||
headers=mp_auth,
|
||||
follow_redirects=False,
|
||||
)
|
||||
assert response.status_code == 302
|
||||
assert f"/store/{mp_store.subdomain}/onboarding" in response.headers["location"]
|
||||
|
||||
Reference in New Issue
Block a user