forked from retoor/devplacepy
Add community node data layer: tables, usage ledger, bandwidth_sharing consent
Phase 2 of plan.md. Seven node_* tables with atomic device, bandwidth and XP caps, a transactional job ledger whose lifetime totals survive pruning, clamped donor settings, and the bandwidth_sharing consent kind. The acceptance service now has an explicit exclusion list so it can never grant that consent. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
from devplacepy.database import CONSENT_KINDS
|
||||
from devplacepy.services.acceptance.agreements import (
|
||||
AGREEMENTS,
|
||||
EXCLUDED_CONSENTS,
|
||||
agreement_for,
|
||||
label_for,
|
||||
setting_key,
|
||||
@@ -11,7 +12,10 @@ from devplacepy.services.acceptance.service import AcceptanceService
|
||||
|
||||
|
||||
def test_every_consent_kind_is_classified_as_an_agreement():
|
||||
assert {agreement.kind for agreement in AGREEMENTS} == set(CONSENT_KINDS)
|
||||
classified = {agreement.kind for agreement in AGREEMENTS}
|
||||
assert classified.isdisjoint(EXCLUDED_CONSENTS)
|
||||
assert classified | set(EXCLUDED_CONSENTS) == set(CONSENT_KINDS)
|
||||
assert all(EXCLUDED_CONSENTS.values())
|
||||
|
||||
|
||||
def test_setting_keys_are_unique_and_namespaced():
|
||||
|
||||
Reference in New Issue
Block a user