File tree 2 files changed +10
-8
lines changed
2 files changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
15
15
### Fixed
16
16
- URL encode $filter contents - Barton Ip
17
17
- JSON errors caused by invalid content length of Batch responses - Barton Ip
18
+ - Invalid test case - test_create_entity_nested_list - Martin Miksik
18
19
19
20
### Changed
20
21
- ODataHttpResponse.from_string produces header of type {header: value} instead of [ (header, value)] - Martin Miksik
Original file line number Diff line number Diff line change @@ -172,20 +172,21 @@ def test_create_entity_nested_list(service):
172
172
173
173
responses .add (
174
174
responses .POST ,
175
- "{0}/Cars " .format (service .url ),
175
+ "{0}/Customers " .format (service .url ),
176
176
headers = {'Content-type' : 'application/json' },
177
177
json = {'d' : {
178
- 'Name' : 'Hadraplan' ,
179
- 'IDPic' : [{
180
- 'CarName' : 'Hadraplan-Plus'
181
- }]
178
+ 'Name' : 'John' ,
179
+ 'Orders' : [
180
+ {'Owner' : 'Mammon' },
181
+ {'Owner' : 'Tomas' },
182
+ ]
182
183
}},
183
184
status = 201 )
184
185
185
- entity = {'Name' : 'Hadraplan ' , 'IDPic' : [{'CarName ' : 'Hadraplan-Plus ' }]}
186
- result = service .entity_sets .Cars .create_entity ().set (** entity ).execute ()
186
+ entity = {'Name' : 'John ' , 'Orders' : [{'Owner ' : 'Mammon' }, { 'Owner' : 'Tomas ' }]}
187
+ result = service .entity_sets .Customers .create_entity ().set (** entity ).execute ()
187
188
188
- assert responses .calls [0 ].request .body == '{"Name": "Hadraplan ", "IDPic ": [{"CarName ": "Hadraplan-Plus "}]}'
189
+ assert responses .calls [0 ].request .body == '{"Name": "John ", "Orders ": [{"Owner ": "Mammon"}, {"Owner": "Tomas "}]}'
189
190
190
191
@responses .activate
191
192
def test_get_entity_property (service ):
You can’t perform that action at this time.
0 commit comments