@@ -79,7 +79,7 @@ def inject_root_id(root_id, d):
79
79
'testA' : UNICODE_TEST_STRING
80
80
}]
81
81
),
82
- # Rollup
82
+ # Single item array
83
83
(
84
84
[{
85
85
'ROOT_ID' : 1 ,
@@ -93,7 +93,7 @@ def inject_root_id(root_id, d):
93
93
}]
94
94
}]
95
95
),
96
- # Rollup without an ID
96
+ # Single item array withou parent ID
97
97
(
98
98
[{
99
99
'ROOT_ID' : '1' ,
@@ -181,6 +181,10 @@ def create_schema(root_id):
181
181
'title' : 'B title' ,
182
182
'type' : 'string' ,
183
183
},
184
+ 'testC' : {
185
+ 'title' : 'C title' ,
186
+ 'type' : 'string' ,
187
+ },
184
188
}
185
189
}
186
190
},
@@ -227,6 +231,20 @@ def create_schema(root_id):
227
231
'testB' : {'testC' : 3 , 'testD' : 4 }
228
232
}]
229
233
),
234
+ # Nested titles should be converted individually
235
+ pytest .mark .xfail ((
236
+ [{
237
+ 'ROOT_ID_TITLE' : 1 ,
238
+ 'Identifier' : 2 ,
239
+ 'B title:C title' : 3 ,
240
+ 'B title:Not in schema' : 4 ,
241
+ }],
242
+ [{
243
+ 'ROOT_ID' : 1 ,
244
+ 'id' : 2 ,
245
+ 'testB' : {'testC' : 3 , 'Not in schema' : 4 }
246
+ }]
247
+ )),
230
248
# Unicode
231
249
(
232
250
[{
@@ -238,7 +256,7 @@ def create_schema(root_id):
238
256
'testU' : UNICODE_TEST_STRING
239
257
}]
240
258
),
241
- # Rollup
259
+ # Single item array
242
260
(
243
261
[{
244
262
'ROOT_ID_TITLE' : 1 ,
@@ -254,7 +272,7 @@ def create_schema(root_id):
254
272
}]
255
273
}]
256
274
),
257
- # Rollup without an ID
275
+ # Single item array without parent ID
258
276
(
259
277
[{
260
278
'ROOT_ID_TITLE' : '1' ,
@@ -269,6 +287,38 @@ def create_schema(root_id):
269
287
}]
270
288
}]
271
289
),
290
+ # Properties of a single item array shouldn't need to be in rollUp list
291
+ # for their titles to be converted
292
+ pytest .mark .xfail ((
293
+ [{
294
+ 'ROOT_ID_TITLE' : 1 ,
295
+ 'Identifier' : 2 ,
296
+ 'R title:Identifier' : 3 ,
297
+ 'R title:C title' : 4
298
+ }],
299
+ [{
300
+ 'ROOT_ID' : 1 ,
301
+ 'id' : 2 ,
302
+ 'testR' : [{
303
+ 'id' : 3 ,
304
+ 'testC' : 4
305
+ }]
306
+ }]
307
+ )),
308
+ # Single item array, titles should be converted individually
309
+ pytest .mark .xfail ((
310
+ [{
311
+ 'ROOT_ID_TITLE' : 1 ,
312
+ 'Identifier' : 2 ,
313
+ 'R title:C title' : 3 ,
314
+ 'R title:Not in schema' : 4 ,
315
+ }],
316
+ [{
317
+ 'ROOT_ID' : 1 ,
318
+ 'id' : 2 ,
319
+ 'testR' : {'testC' : 3 , 'Not in schema' : 4 }
320
+ }]
321
+ )),
272
322
# Empty
273
323
(
274
324
[{
0 commit comments