@@ -92,7 +92,11 @@ def test_cancel_algo_order_future_algo_success(self, mock_get_signature):
9292
9393 if is_list and not is_flat_list :
9494 expected = expected_response
95- elif is_oneof or is_list :
95+ elif (
96+ is_oneof
97+ or is_list
98+ or hasattr (CancelAlgoOrderFutureAlgoResponse , "from_dict" )
99+ ):
96100 expected = CancelAlgoOrderFutureAlgoResponse .from_dict (expected_response )
97101 else :
98102 expected = CancelAlgoOrderFutureAlgoResponse .model_validate_json (
@@ -133,7 +137,11 @@ def test_cancel_algo_order_future_algo_success_with_optional_params(
133137
134138 if is_list and not is_flat_list :
135139 expected = expected_response
136- elif is_oneof or is_list :
140+ elif (
141+ is_oneof
142+ or is_list
143+ or hasattr (CancelAlgoOrderFutureAlgoResponse , "from_dict" )
144+ ):
137145 expected = CancelAlgoOrderFutureAlgoResponse .from_dict (expected_response )
138146 else :
139147 expected = CancelAlgoOrderFutureAlgoResponse .model_validate_json (
@@ -217,7 +225,11 @@ def test_query_current_algo_open_orders_future_algo_success(
217225
218226 if is_list and not is_flat_list :
219227 expected = expected_response
220- elif is_oneof or is_list :
228+ elif (
229+ is_oneof
230+ or is_list
231+ or hasattr (QueryCurrentAlgoOpenOrdersFutureAlgoResponse , "from_dict" )
232+ ):
221233 expected = QueryCurrentAlgoOpenOrdersFutureAlgoResponse .from_dict (
222234 expected_response
223235 )
@@ -280,7 +292,11 @@ def test_query_current_algo_open_orders_future_algo_success_with_optional_params
280292
281293 if is_list and not is_flat_list :
282294 expected = expected_response
283- elif is_oneof or is_list :
295+ elif (
296+ is_oneof
297+ or is_list
298+ or hasattr (QueryCurrentAlgoOpenOrdersFutureAlgoResponse , "from_dict" )
299+ ):
284300 expected = QueryCurrentAlgoOpenOrdersFutureAlgoResponse .from_dict (
285301 expected_response
286302 )
@@ -352,7 +368,11 @@ def test_query_historical_algo_orders_future_algo_success(self, mock_get_signatu
352368
353369 if is_list and not is_flat_list :
354370 expected = expected_response
355- elif is_oneof or is_list :
371+ elif (
372+ is_oneof
373+ or is_list
374+ or hasattr (QueryHistoricalAlgoOrdersFutureAlgoResponse , "from_dict" )
375+ ):
356376 expected = QueryHistoricalAlgoOrdersFutureAlgoResponse .from_dict (
357377 expected_response
358378 )
@@ -423,7 +443,11 @@ def test_query_historical_algo_orders_future_algo_success_with_optional_params(
423443
424444 if is_list and not is_flat_list :
425445 expected = expected_response
426- elif is_oneof or is_list :
446+ elif (
447+ is_oneof
448+ or is_list
449+ or hasattr (QueryHistoricalAlgoOrdersFutureAlgoResponse , "from_dict" )
450+ ):
427451 expected = QueryHistoricalAlgoOrdersFutureAlgoResponse .from_dict (
428452 expected_response
429453 )
@@ -505,7 +529,11 @@ def test_query_sub_orders_future_algo_success(self, mock_get_signature):
505529
506530 if is_list and not is_flat_list :
507531 expected = expected_response
508- elif is_oneof or is_list :
532+ elif (
533+ is_oneof
534+ or is_list
535+ or hasattr (QuerySubOrdersFutureAlgoResponse , "from_dict" )
536+ ):
509537 expected = QuerySubOrdersFutureAlgoResponse .from_dict (expected_response )
510538 else :
511539 expected = QuerySubOrdersFutureAlgoResponse .model_validate_json (
@@ -568,7 +596,11 @@ def test_query_sub_orders_future_algo_success_with_optional_params(
568596
569597 if is_list and not is_flat_list :
570598 expected = expected_response
571- elif is_oneof or is_list :
599+ elif (
600+ is_oneof
601+ or is_list
602+ or hasattr (QuerySubOrdersFutureAlgoResponse , "from_dict" )
603+ ):
572604 expected = QuerySubOrdersFutureAlgoResponse .from_dict (expected_response )
573605 else :
574606 expected = QuerySubOrdersFutureAlgoResponse .model_validate_json (
@@ -649,7 +681,11 @@ def test_time_weighted_average_price_future_algo_success(self, mock_get_signatur
649681
650682 if is_list and not is_flat_list :
651683 expected = expected_response
652- elif is_oneof or is_list :
684+ elif (
685+ is_oneof
686+ or is_list
687+ or hasattr (TimeWeightedAveragePriceFutureAlgoResponse , "from_dict" )
688+ ):
653689 expected = TimeWeightedAveragePriceFutureAlgoResponse .from_dict (
654690 expected_response
655691 )
@@ -707,7 +743,11 @@ def test_time_weighted_average_price_future_algo_success_with_optional_params(
707743
708744 if is_list and not is_flat_list :
709745 expected = expected_response
710- elif is_oneof or is_list :
746+ elif (
747+ is_oneof
748+ or is_list
749+ or hasattr (TimeWeightedAveragePriceFutureAlgoResponse , "from_dict" )
750+ ):
711751 expected = TimeWeightedAveragePriceFutureAlgoResponse .from_dict (
712752 expected_response
713753 )
@@ -847,7 +887,11 @@ def test_volume_participation_future_algo_success(self, mock_get_signature):
847887
848888 if is_list and not is_flat_list :
849889 expected = expected_response
850- elif is_oneof or is_list :
890+ elif (
891+ is_oneof
892+ or is_list
893+ or hasattr (VolumeParticipationFutureAlgoResponse , "from_dict" )
894+ ):
851895 expected = VolumeParticipationFutureAlgoResponse .from_dict (
852896 expected_response
853897 )
@@ -905,7 +949,11 @@ def test_volume_participation_future_algo_success_with_optional_params(
905949
906950 if is_list and not is_flat_list :
907951 expected = expected_response
908- elif is_oneof or is_list :
952+ elif (
953+ is_oneof
954+ or is_list
955+ or hasattr (VolumeParticipationFutureAlgoResponse , "from_dict" )
956+ ):
909957 expected = VolumeParticipationFutureAlgoResponse .from_dict (
910958 expected_response
911959 )
0 commit comments