Fix broken assertion in events.py