@@ -236,6 +236,34 @@ async def test_success(self, client: Client) -> None:
236236 assert isinstance (desc , WorkflowExecution )
237237 assert desc .status == "running"
238238
239+ @pytest .mark .asyncio
240+ async def test_describe_request_matches_polyglot_fixture (self , client : Client ) -> None :
241+ fixture_path = Path (__file__ ).parent / "fixtures" / "control-plane" / "workflow-describe-parity.json"
242+ fixture = json .loads (fixture_path .read_text ())
243+ sdk = fixture ["sdk_python" ]
244+
245+ resp = _mock_response (200 , fixture ["response_body" ])
246+
247+ with patch .object (client ._http , "request" , new_callable = AsyncMock , return_value = resp ) as mock :
248+ desc = await client .describe_workflow (** sdk ["args" ])
249+
250+ call_args = mock .call_args
251+ assert call_args .args [0 ] == fixture ["request" ]["method" ]
252+ assert call_args .args [1 ] == f"/api{ fixture ['request' ]['path' ]} "
253+ assert call_args .kwargs .get ("json" ) is None
254+
255+ semantic = fixture ["semantic_body" ]
256+ response = fixture ["response_body" ]
257+ assert sdk ["args" ]["workflow_id" ] == semantic ["workflow_id" ]
258+ assert desc .workflow_id == semantic ["workflow_id" ]
259+ assert desc .run_id == response ["run_id" ]
260+ assert desc .workflow_type == response ["workflow_type" ]
261+ assert desc .namespace == response ["namespace" ]
262+ assert desc .task_queue == response ["task_queue" ]
263+ assert desc .status == response ["status" ]
264+ assert desc .payload_codec == response ["payload_codec" ]
265+ assert desc .input == response ["input" ]
266+
239267 @pytest .mark .asyncio
240268 async def test_envelope_fields (self , client : Client ) -> None :
241269 resp = _mock_response (200 , {
0 commit comments