@@ -182,7 +182,7 @@ def test_successful_changeset_returns_all_items(self):
182182
183183 self .assertFalse (result .has_errors )
184184 self .assertEqual (len (result .succeeded ), 3 )
185- self .assertEqual (len (result .created_ids ), 3 )
185+ self .assertEqual (len (result .entity_ids ), 3 )
186186 # Verify content-IDs were extracted
187187 content_ids = [r .content_id for r in result .responses ]
188188 self .assertEqual (content_ids , ["1" , "2" , "3" ])
@@ -518,7 +518,7 @@ def test_mixed_success_and_failure(self):
518518 self .assertEqual (len (result .succeeded ), 2 )
519519 self .assertEqual (len (result .failed ), 1 )
520520 self .assertEqual (result .failed [0 ].error_code , "0x80040237" )
521- self .assertEqual (len (result .created_ids ), 2 )
521+ self .assertEqual (len (result .entity_ids ), 2 )
522522
523523
524524# ---------------------------------------------------------------------------
@@ -603,24 +603,24 @@ def test_absolute_urls_in_batch_parts(self):
603603class TestBatchResultProperties (unittest .TestCase ):
604604 """Verify computed properties of BatchResult."""
605605
606- def test_created_ids_only_from_201_and_204 (self ):
607- """created_ids should include entity_ids from all 2xx (including 201 and 204)."""
606+ def test_entity_ids_only_from_201_and_204 (self ):
607+ """entity_ids should include entity_ids from all 2xx (including 201 and 204)."""
608608 responses = [
609609 BatchItemResponse (status_code = 201 , entity_id = "id-201" ),
610610 BatchItemResponse (status_code = 204 , entity_id = "id-204" ),
611611 BatchItemResponse (status_code = 200 , entity_id = None ), # GET success, no entity_id
612612 BatchItemResponse (status_code = 400 , entity_id = None ),
613613 ]
614614 result = BatchResult (responses = responses )
615- self .assertEqual (result .created_ids , ["id-201" , "id-204" ])
615+ self .assertEqual (result .entity_ids , ["id-201" , "id-204" ])
616616
617617 def test_empty_batch_result_properties (self ):
618618 """Empty BatchResult has correct defaults."""
619619 result = BatchResult ()
620620 self .assertEqual (result .succeeded , [])
621621 self .assertEqual (result .failed , [])
622622 self .assertFalse (result .has_errors )
623- self .assertEqual (result .created_ids , [])
623+ self .assertEqual (result .entity_ids , [])
624624
625625 def test_all_success_no_errors (self ):
626626 """All 2xx responses means has_errors is False."""
@@ -643,10 +643,10 @@ def test_single_failure_makes_has_errors_true(self):
643643 self .assertTrue (result .has_errors )
644644 self .assertEqual (len (result .failed ), 1 )
645645
646- def test_created_ids_from_create_multiple_not_in_created_ids (self ):
647- """CreateMultiple IDs are in data['Ids'], NOT in created_ids property.
646+ def test_entity_ids_from_create_multiple_not_in_created_ids (self ):
647+ """CreateMultiple IDs are in data['Ids'], NOT in entity_ids property.
648648
649- created_ids only returns entity_id from OData-EntityId headers.
649+ entity_ids only returns entity_id from OData-EntityId headers.
650650 Callers access CreateMultiple IDs via response.data['Ids'] directly.
651651 """
652652 responses = [
@@ -658,17 +658,17 @@ def test_created_ids_from_create_multiple_not_in_created_ids(self):
658658 ),
659659 ]
660660 result = BatchResult (responses = responses )
661- # created_ids does NOT include bulk IDs (no OData-EntityId header)
662- self .assertEqual (result .created_ids , [])
661+ # entity_ids does NOT include bulk IDs (no OData-EntityId header)
662+ self .assertEqual (result .entity_ids , [])
663663 # Callers access them from the response data
664664 self .assertEqual (result .succeeded [0 ].data ["Ids" ], ["guid-1" , "guid-2" , "guid-3" ])
665665
666- def test_created_ids_only_from_odata_entity_id_header (self ):
667- """created_ids only collects entity_id from OData-EntityId headers."""
666+ def test_entity_ids_only_from_odata_entity_id_header (self ):
667+ """entity_ids only collects entity_id from OData-EntityId headers."""
668668 responses = [
669669 # Single create: entity_id from header
670670 BatchItemResponse (status_code = 204 , entity_id = "single-id" ),
671- # CreateMultiple: Ids from body (not in created_ids )
671+ # CreateMultiple: Ids from body (not in entity_ids )
672672 BatchItemResponse (
673673 status_code = 200 ,
674674 entity_id = None ,
@@ -677,7 +677,7 @@ def test_created_ids_only_from_odata_entity_id_header(self):
677677 ]
678678 result = BatchResult (responses = responses )
679679 # Only the header-based entity_id
680- self .assertEqual (result .created_ids , ["single-id" ])
680+ self .assertEqual (result .entity_ids , ["single-id" ])
681681 # Bulk IDs accessed via response.data
682682 self .assertEqual (result .responses [1 ].data ["Ids" ], ["bulk-id-1" , "bulk-id-2" ])
683683
@@ -693,7 +693,7 @@ def test_bulk_ids_accessible_via_response_data(self):
693693 ]
694694 result = BatchResult (responses = responses )
695695 # Collect all IDs from both sources (what a caller would do)
696- all_ids = list (result .created_ids )
696+ all_ids = list (result .entity_ids )
697697 for resp in result .succeeded :
698698 if resp .data and isinstance (resp .data .get ("Ids" ), list ):
699699 all_ids .extend (resp .data ["Ids" ])
@@ -740,7 +740,7 @@ def test_create_multiple_response_parsed(self):
740740 # But data should contain the Ids array
741741 self .assertEqual (result .succeeded [0 ].data ["Ids" ], ["aaa-111" , "bbb-222" , "ccc-333" ])
742742 # created_ids won't have these (no OData-EntityId header)
743- self .assertEqual (result .created_ids , [])
743+ self .assertEqual (result .entity_ids , [])
744744 # Callers access bulk IDs via response.data["Ids"]
745745 bulk_ids = result .succeeded [0 ].data ["Ids" ]
746746 self .assertEqual (len (bulk_ids ), 3 )
@@ -784,8 +784,8 @@ def test_mixed_single_and_bulk_creates(self):
784784
785785 self .assertFalse (result .has_errors )
786786 self .assertEqual (len (result .succeeded ), 2 )
787- # created_ids only has the individual create's entity_id
788- self .assertEqual (result .created_ids , [single_guid ])
787+ # entity_ids only has the individual create's entity_id
788+ self .assertEqual (result .entity_ids , [single_guid ])
789789 # CreateMultiple IDs are in the second response's data
790790 self .assertEqual (result .responses [1 ].data ["Ids" ], ["bulk-1" , "bulk-2" ])
791791
0 commit comments