@@ -520,7 +520,11 @@ def test_run_report_with_infeasible_quotas_error_serialisation(self):
520520 features = CaseInsensitiveDict ()
521521 features ["feat1" ] = CaseInsensitiveDict ()
522522 features ["feat1" ]["value1" ] = FeatureValueMinMax (min = 2 , max = 4 )
523- report .add_error (InfeasibleQuotasError (features = features , output = ["line1" , "line2" ]))
523+ msgs = ["line1" , "line2" ]
524+ iq_error = InfeasibleQuotasError (features = features , output = msgs )
525+ # with round trips we can end up with the args being set to include features
526+ iq_error .args = (features , ["intro" , * msgs ])
527+ report .add_error (iq_error )
524528 serialised_form = report .serialize ()
525529 assert "_data" in serialised_form
526530 assert len (serialised_form ["_data" ]) == 1
@@ -532,7 +536,11 @@ def test_run_report_with_infeasible_quotas_error_deserialisation(self):
532536 features = CaseInsensitiveDict ()
533537 features ["feat1" ] = CaseInsensitiveDict ()
534538 features ["feat1" ]["value1" ] = FeatureValueMinMax (min = 2 , max = 4 )
535- report .add_error (InfeasibleQuotasError (features = features , output = ["line1" , "line2" ]))
539+ msgs = ["line1" , "line2" ]
540+ iq_error = InfeasibleQuotasError (features = features , output = msgs )
541+ # with round trips we can end up with the args being set to include features
542+ iq_error .args = (features , ["intro" , * msgs ])
543+ report .add_error (iq_error )
536544 serialised_form = report .serialize ()
537545 json_report = json .dumps (serialised_form )
538546 from_json = json .loads (json_report )
0 commit comments