@@ -94,7 +94,9 @@ def setUp(self):
9494 def test_create_relationship_url (self ):
9595 """Test that correct URL is used."""
9696 mock_response = Mock ()
97- mock_response .headers = {"OData-EntityId" : "https://example.crm.dynamics.com/api/data/v9.2/RelationshipDefinitions(12345678-1234-1234-1234-123456789abc)" }
97+ mock_response .headers = {
98+ "OData-EntityId" : "https://example.crm.dynamics.com/api/data/v9.2/RelationshipDefinitions(12345678-1234-1234-1234-123456789abc)"
99+ }
98100 self .client ._mock_request .return_value = mock_response
99101
100102 self .client ._create_one_to_many_relationship (self .lookup , self .relationship )
@@ -107,7 +109,9 @@ def test_create_relationship_url(self):
107109 def test_create_relationship_payload_includes_lookup (self ):
108110 """Test that payload includes both relationship and lookup metadata."""
109111 mock_response = Mock ()
110- mock_response .headers = {"OData-EntityId" : "https://example.crm.dynamics.com/api/data/v9.2/RelationshipDefinitions(12345678-1234-1234-1234-123456789abc)" }
112+ mock_response .headers = {
113+ "OData-EntityId" : "https://example.crm.dynamics.com/api/data/v9.2/RelationshipDefinitions(12345678-1234-1234-1234-123456789abc)"
114+ }
111115 self .client ._mock_request .return_value = mock_response
112116
113117 self .client ._create_one_to_many_relationship (self .lookup , self .relationship )
@@ -123,12 +127,12 @@ def test_create_relationship_payload_includes_lookup(self):
123127 def test_create_relationship_with_solution (self ):
124128 """Test that solution header is added when specified."""
125129 mock_response = Mock ()
126- mock_response .headers = {"OData-EntityId" : "https://example.crm.dynamics.com/api/data/v9.2/RelationshipDefinitions(12345678-1234-1234-1234-123456789abc)" }
130+ mock_response .headers = {
131+ "OData-EntityId" : "https://example.crm.dynamics.com/api/data/v9.2/RelationshipDefinitions(12345678-1234-1234-1234-123456789abc)"
132+ }
127133 self .client ._mock_request .return_value = mock_response
128134
129- self .client ._create_one_to_many_relationship (
130- self .lookup , self .relationship , solution_unique_name = "MySolution"
131- )
135+ self .client ._create_one_to_many_relationship (self .lookup , self .relationship , solution_unique_name = "MySolution" )
132136
133137 # Verify solution header
134138 call_args = self .client ._mock_request .call_args
@@ -138,7 +142,9 @@ def test_create_relationship_with_solution(self):
138142 def test_create_relationship_returns_result (self ):
139143 """Test that result dictionary is correctly populated."""
140144 mock_response = Mock ()
141- mock_response .headers = {"OData-EntityId" : "https://example.crm.dynamics.com/api/data/v9.2/RelationshipDefinitions(12345678-1234-1234-1234-123456789abc)" }
145+ mock_response .headers = {
146+ "OData-EntityId" : "https://example.crm.dynamics.com/api/data/v9.2/RelationshipDefinitions(12345678-1234-1234-1234-123456789abc)"
147+ }
142148 self .client ._mock_request .return_value = mock_response
143149
144150 result = self .client ._create_one_to_many_relationship (self .lookup , self .relationship )
@@ -166,7 +172,9 @@ def setUp(self):
166172 def test_create_m2m_relationship_url (self ):
167173 """Test that correct URL is used."""
168174 mock_response = Mock ()
169- mock_response .headers = {"OData-EntityId" : "https://example.crm.dynamics.com/api/data/v9.2/RelationshipDefinitions(abcd1234-abcd-1234-abcd-1234abcd5678)" }
175+ mock_response .headers = {
176+ "OData-EntityId" : "https://example.crm.dynamics.com/api/data/v9.2/RelationshipDefinitions(abcd1234-abcd-1234-abcd-1234abcd5678)"
177+ }
170178 self .client ._mock_request .return_value = mock_response
171179
172180 self .client ._create_many_to_many_relationship (self .relationship )
@@ -178,7 +186,9 @@ def test_create_m2m_relationship_url(self):
178186 def test_create_m2m_relationship_returns_result (self ):
179187 """Test that result dictionary is correctly populated."""
180188 mock_response = Mock ()
181- mock_response .headers = {"OData-EntityId" : "https://example.crm.dynamics.com/api/data/v9.2/RelationshipDefinitions(abcd1234-abcd-1234-abcd-1234abcd5678)" }
189+ mock_response .headers = {
190+ "OData-EntityId" : "https://example.crm.dynamics.com/api/data/v9.2/RelationshipDefinitions(abcd1234-abcd-1234-abcd-1234abcd5678)"
191+ }
182192 self .client ._mock_request .return_value = mock_response
183193
184194 result = self .client ._create_many_to_many_relationship (self .relationship )
@@ -207,7 +217,7 @@ def test_delete_relationship_url(self):
207217 self .assertEqual (call_args [0 ][0 ], "delete" )
208218 self .assertEqual (
209219 call_args [0 ][1 ],
210- "https://example.crm.dynamics.com/api/data/v9.2/RelationshipDefinitions(12345678-1234-1234-1234-123456789abc)"
220+ "https://example.crm.dynamics.com/api/data/v9.2/RelationshipDefinitions(12345678-1234-1234-1234-123456789abc)" ,
211221 )
212222
213223 def test_delete_relationship_has_if_match_header (self ):
0 commit comments