Added test to make sure __notifiable__ domain event class feature
isn't being used without set_notification_ids (just to be helpful).
@@ -495,6 +495,10 @@ class SimpleApplication(Pipeable, Generic[TVersionedEntity, TVersionedEvent]):
setattr(
event_record, notification_id_name, "event-not-notifiable"
)
+ else:
+ if any((not e.__notifiable__ for e in pending_events)):
+ raise Exception("Can't set __notifiable__=False withut "
+ "set_notification_ids=True ")
if self.use_causal_dependencies:
assert hasattr(record_manager.record_class, "causal_dependencies")
