chatelet/tests
Padreug 9ab52f2c69 feat: per-operator settings — house rules + card acceptance (multi-tenant)
Chatelet is multi-tenant: any LNbits user can host rooms. What an operator
decides for all their rooms now lives in chatelet.operator_settings, keyed
by user id and created lazily (m003, which also indexes bookings by guest):
check-in/out times, cancellation policy, and accept_fiat.

Guests see it: the public room view (both doors) gains house_rules and
payment_methods, and the kind:30402 listing carries payment_methods,
checkin_time and checkout_time tags so a generic Nostr client can render
the right pay buttons and rules without our RPC. The check-in DM reads the
room owner's rules instead of the instance row.

Card is offered only when the operator opted in, the room is fiat-priced,
and LNbits core has a fiat provider for that user — resolved through
settings.get_fiat_providers_for_user(owner), the one seam lnbits#67's
per-user Stripe credentials will plug into; chatelet never sees creds.

Operator endpoints: GET/PUT /api/v1/operator (admin key → wallet user) and
RPC twins chatelet_operator_get/update (AUTH_WALLET); saving re-publishes
the owner's active listings. Admin UI moves the house-rule inputs into a
per-operator card with the card toggle and a provider hint. The old
house-rule columns on settings stay for old rows but are no longer read.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-16 12:16:14 +02:00
..
__init__.py test: booking-flow, availability, and #4 concurrency regression 2026-07-19 17:48:11 +02:00
conftest.py feat: per-operator settings — house rules + card acceptance (multi-tenant) 2026-09-16 12:16:14 +02:00
test_admin_endpoints.py test: operator admin endpoint logic (ownership, update, settings merge) 2026-07-20 00:44:10 +02:00
test_atomic_hold.py test: booking-flow, availability, and #4 concurrency regression 2026-07-19 17:48:11 +02:00
test_availability.py test: booking-flow, availability, and #4 concurrency regression 2026-07-19 17:48:11 +02:00
test_availability_endpoint.py fix(models): restore check_in/check_out on AvailabilityQuery 2026-09-16 11:42:43 +02:00
test_booking_flow.py test: booking-flow, availability, and #4 concurrency regression 2026-07-19 17:48:11 +02:00
test_events.py test: event-builder shape (30402/30078/31923/22001) 2026-07-19 18:09:35 +02:00
test_giftwrap.py test: NIP-59 gift wrap structure + crypto round-trip 2026-07-19 20:34:12 +02:00
test_migrations.py test: real-DB migration test (#14) 2026-07-20 00:10:52 +02:00
test_operator_settings.py feat: per-operator settings — house rules + card acceptance (multi-tenant) 2026-09-16 12:16:14 +02:00
test_public_endpoints.py feat: per-operator settings — house rules + card acceptance (multi-tenant) 2026-09-16 12:16:14 +02:00
test_unavailable_ranges.py feat(api): keyless unavailable-ranges feed for the guest calendar 2026-09-16 11:45:51 +02:00