소스 검색

tests: fix test_get_thread_live for EventRecord-returning Reservation.list()

Reservation.list() returns EventRecord dataclasses, not dicts; the test was
still calling ev.get('x_data', ''), left over from before that change.
ZiB 14 시간 전
부모
커밋
48b6489e6a
1개의 변경된 파일과 1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      tests/test_chat.py

+ 1 - 1
tests/test_chat.py

@@ -243,7 +243,7 @@ async def test_get_thread_live():
   target_service = None
   target_chat_id = None
   for ev in events:
-    xd = safe_json_loads(ev.get('x_data', '')) or {}
+    xd = safe_json_loads(ev.x_data) or {}
     service = xd.get('service')
     chat_id = xd.get('chat_id')
     if not service or not chat_id: