@@ -272,7 +272,9 @@ def assert_path_response(
272272 assert "success" in result , f"PathResponse missing 'success': { result } "
273273 assert result ["success" ] is True , f"PathResponse success is not True: { result } "
274274 assert "path" in result , f"PathResponse missing 'path': { result } "
275- assert isinstance (result ["path" ], str ), f"PathResponse 'path' not a string: { result } "
275+ assert isinstance (result ["path" ], str ), (
276+ f"PathResponse 'path' not a string: { result } "
277+ )
276278
277279 if expected_path is not None :
278280 assert result ["path" ] == expected_path , (
@@ -306,7 +308,9 @@ def assert_gamestate_response(
306308
307309 # Verify required GameState field
308310 assert "state" in result , f"GameStateResponse missing 'state': { result } "
309- assert isinstance (result ["state" ], str ), f"GameStateResponse 'state' not a string: { result } "
311+ assert isinstance (result ["state" ], str ), (
312+ f"GameStateResponse 'state' not a string: { result } "
313+ )
310314
311315 # Verify any expected fields
312316 for field , expected_value in expected_fields .items ():
@@ -345,13 +349,17 @@ def assert_test_response(
345349 assert result ["success" ] is True , f"TestResponse success is not True: { result } "
346350
347351 if expected_received_args is not None :
348- assert "received_args" in result , f"TestResponse missing 'received_args': { result } "
352+ assert "received_args" in result , (
353+ f"TestResponse missing 'received_args': { result } "
354+ )
349355 assert result ["received_args" ] == expected_received_args , (
350356 f"TestResponse received_args: expected { expected_received_args } , got { result ['received_args' ]} "
351357 )
352358
353359 if expected_state_validated is not None :
354- assert "state_validated" in result , f"TestResponse missing 'state_validated': { result } "
360+ assert "state_validated" in result , (
361+ f"TestResponse missing 'state_validated': { result } "
362+ )
355363 assert result ["state_validated" ] == expected_state_validated , (
356364 f"TestResponse state_validated: expected { expected_state_validated } , got { result ['state_validated' ]} "
357365 )
@@ -378,14 +386,20 @@ def assert_error_response(
378386 AssertionError: If response is not a valid ErrorResponse.
379387 """
380388 assert "error" in response , f"Expected 'error' in response, got: { response } "
381- assert "result" not in response , f"Unexpected 'result' in error response: { response } "
389+ assert "result" not in response , (
390+ f"Unexpected 'result' in error response: { response } "
391+ )
382392
383393 error = response ["error" ]
384394 assert "message" in error , f"ErrorResponse missing 'message': { error } "
385395 assert "data" in error , f"ErrorResponse missing 'data': { error } "
386396 assert "name" in error ["data" ], f"ErrorResponse data missing 'name': { error } "
387- assert isinstance (error ["message" ], str ), f"ErrorResponse 'message' not a string: { error } "
388- assert isinstance (error ["data" ]["name" ], str ), f"ErrorResponse 'name' not a string: { error } "
397+ assert isinstance (error ["message" ], str ), (
398+ f"ErrorResponse 'message' not a string: { error } "
399+ )
400+ assert isinstance (error ["data" ]["name" ], str ), (
401+ f"ErrorResponse 'name' not a string: { error } "
402+ )
389403
390404 if expected_error_name is not None :
391405 actual_name = error ["data" ]["name" ]
0 commit comments