File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -138,16 +138,14 @@ def test_unknown_type_raises(self):
138138 RelationshipInfo .from_api_response (raw )
139139 self .assertIn ("Unrecognized relationship" , str (ctx .exception ))
140140
141- def test_missing_fields (self ):
142- """Should handle missing optional fields without error ."""
141+ def test_missing_required_fields_raises (self ):
142+ """Should raise KeyError when required API fields are missing ."""
143143 raw = {
144144 "@odata.type" : "#Microsoft.Dynamics.CRM.OneToManyRelationshipMetadata" ,
145145 "SchemaName" : "minimal" ,
146146 }
147- info = RelationshipInfo .from_api_response (raw )
148- self .assertEqual (info .relationship_type , "one_to_many" )
149- self .assertIsNone (info .relationship_id )
150- self .assertEqual (info .referenced_entity , "" )
147+ with self .assertRaises (KeyError ):
148+ RelationshipInfo .from_api_response (raw )
151149
152150
153151class TestCascadeConfiguration :
You can’t perform that action at this time.
0 commit comments