This commit is contained in:
2026-10-20 16:58:31 +02:00
parent 52a4ebbe58
commit 407673bf57
7 changed files with 11 additions and 16 deletions
+4 -5
View File
@@ -70,12 +70,12 @@ def test_each_missing_requirement_has_its_own_reason(switched_on):
assert GATE.allows(withdrawn).reason == "no_consent"
@pytest.mark.parametrize("band", ["", "under_min", "13_15", "16_17"])
def test_only_adults_pass(switched_on, band):
@pytest.mark.parametrize("band", ["", "under_min", "13_15", "16_17", "adult"])
def test_age_band_is_not_checked(switched_on, band):
uid = fresh(age_band=band)
set_consent("user", uid, "bandwidth_sharing", True)
save_node_settings(uid, {"enabled": True})
assert GATE.allows(uid).reason == "not_adult"
assert GATE.allows(uid).allowed
def test_account_states_block(switched_on):
@@ -98,7 +98,6 @@ def test_every_reason_is_described():
"account_inactive",
"deletion_pending",
"suspended",
"not_adult",
"no_consent",
"not_enabled",
):
@@ -120,7 +119,7 @@ def test_batch_decisions_equal_single_decisions(switched_on):
for uid in uids:
assert many[uid] == GATE.allows(uid)
assert [many[uid].reason for uid in uids] == [
"", "no_consent", "not_adult", "no_consent", "no_account",
"", "no_consent", "", "no_consent", "no_account",
]