refactor floating_domain to structured object-only payload
This commit is contained in:
@@ -50,7 +50,7 @@ async def _mock_home_stream(user_id, message, context):
|
||||
|
||||
|
||||
async def _mock_floating_stream(user_id, message, context):
|
||||
yield "floating_domain", "tasks"
|
||||
yield "floating_domain", {"type": "task", "id": None, "section": None}
|
||||
yield "token", "Here is a summary"
|
||||
|
||||
|
||||
@@ -102,7 +102,7 @@ def test_floating_request_produces_domain_frame(client):
|
||||
assert types.index(WsFrameType.floating_domain) < types.index(WsFrameType.stream_end)
|
||||
|
||||
domain_frame = next(f for f in frames if f["type"] == WsFrameType.floating_domain)
|
||||
assert domain_frame["domain"] == "tasks"
|
||||
assert domain_frame["domain"]["type"] == "task"
|
||||
assert domain_frame["request_id"] == "p1"
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user