from src.events import SyncEventQueue

def test_sync_event_queue_put_get() -> None:
 """Verify that an event can be put and retrieved from the queue."""
 queue = SyncEventQueue()
 event_name = "test_event"
 payload = {"data": "hello"}
 queue.put(event_name, payload)
 ret_name, ret_payload = queue.get()
 assert ret_name == event_name
 assert ret_payload == payload

def test_sync_event_queue_multiple() -> None:
 """Verify that multiple events can be put and retrieved in order."""
 queue = SyncEventQueue()
 queue.put("event1", 1)
 queue.put("event2", 2)
 name1, val1 = queue.get()
 name2, val2 = queue.get()
 assert name1 == "event1"
 assert val1 == 1
 assert name2 == "event2"
 assert val2 == 2

def test_sync_event_queue_none_payload() -> None:
 """Verify that an event with None payload works correctly."""
 queue = SyncEventQueue()
 queue.put("no_payload")
 name, payload = queue.get()
 assert name == "no_payload"
 assert payload is None