@@ -266,7 +266,6 @@ def test_create_and_update_rg_config_populate_validation_errors(client: DataMasq
266266 "name" : "test_config" ,
267267 "config_yaml" : CONFIG_YAML ,
268268 "is_valid" : "invalid" ,
269- "validation_error" : "Missing required field: labels" ,
270269 "validation_errors" : [
271270 {
272271 "message" : "Missing required field: labels" ,
@@ -279,7 +278,7 @@ def test_create_and_update_rg_config_populate_validation_errors(client: DataMasq
279278 "created" : "2025-06-01T10:00:00Z" ,
280279 "modified" : "2025-06-01T10:00:00Z" ,
281280 }
282- valid_response = {** invalid_response , "is_valid" : "valid" , "validation_error" : None , " validation_errors" : []}
281+ valid_response = {** invalid_response , "is_valid" : "valid" , "validation_errors" : []}
283282
284283 with requests_mock .Mocker () as m :
285284 m .post ("http://test-server/api/ruleset-generation-configs/" , json = invalid_response , status_code = 201 )
@@ -305,7 +304,6 @@ def test_create_and_update_rg_config_populate_validation_errors(client: DataMasq
305304
306305 for request in m .request_history :
307306 assert "validation_errors" not in request .json ()
308- assert "validation_error" not in request .json ()
309307
310308
311309def test_update_rg_config (client : DataMasqueClient , rg_config : RGConfig ) -> None :
@@ -476,21 +474,21 @@ def test_get_default_rg_config_yaml(client: DataMasqueClient) -> None:
476474
477475
478476def test_rg_config_parses_validation_fields () -> None :
479- """`is_valid` and `validation_error ` round-trip from API responses."""
477+ """`is_valid` and `validation_errors ` round-trip from API responses."""
480478 config = RGConfig .model_validate (
481479 {
482480 "id" : CONFIG_ID_1 ,
483481 "name" : "my_config" ,
484482 "config_yaml" : "labels: []" ,
485483 "is_valid" : "invalid" ,
486- "validation_error " : " bad shape on line 3" ,
484+ "validation_errors " : [{ "message" : " bad shape on line 3", "line_number" : 3 , "column_number" : 1 }] ,
487485 "created" : "2025-01-01T12:00:00Z" ,
488486 "modified" : "2025-01-02T12:00:00Z" ,
489487 }
490488 )
491489
492490 assert config .is_valid is ValidationStatus .invalid
493- assert config .validation_error == "bad shape on line 3"
491+ assert config .validation_errors [ 0 ]. message == "bad shape on line 3"
494492
495493
496494def test_rg_config_validation_fields_optional () -> None :
@@ -505,7 +503,7 @@ def test_rg_config_validation_fields_optional() -> None:
505503 )
506504
507505 assert config .is_valid is None
508- assert config .validation_error is None
506+ assert config .validation_errors == []
509507
510508
511509def test_unwrap_rg_config_id_passes_through_strings () -> None :
0 commit comments