refactor: rename raise_event to apply_event and _events to _changes

This commit is contained in:
2026-07-29 10:40:04 -04:00
parent 5bb6cedd03
commit 7eace9212d
4 changed files with 24 additions and 24 deletions

View File

@@ -248,7 +248,7 @@ def test_classified_ad_is_instance_of_entity():
assert isinstance(ad, Entity)
def test_classified_ad_can_use_entity_raise_event():
def test_classified_ad_can_use_entity_apply_event():
ad = ClassifiedAd(
id=ClassifiedAdId(value=uuid4()),
_ownerId=UserId(value=uuid4()),
@@ -258,7 +258,7 @@ def test_classified_ad_can_use_entity_raise_event():
)
event = ClassifiedAdSentForReview(id=ad.id.value)
updated_ad = ad.raise_event(event)
updated_ad = ad.apply_event(event)
assert updated_ad.get_changes() == (ad.get_changes()[0], event)
assert len(ad.get_changes()) == 1