Skip to content

Commit 44069a0

Browse files
committed
[#90] Tests of outputted JSON ordering now pass
1 parent cdf71fd commit 44069a0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

flattentool/tests/test_input_SpreadsheetInput_unflatten_mulitplesheets.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ def test_basic_two_sub_sheets(self):
129129
spreadsheet_input.read_sheets()
130130
unflattened = list(spreadsheet_input.unflatten())
131131
assert len(unflattened) == 2
132-
assert set(unflattened[0]) == set(['ocid', 'id', 'sub1Field']) # FIXME should be ordered
132+
assert list(unflattened[0]) == ['ocid', 'id', 'sub1Field']
133133
assert unflattened[0]['ocid'] == 1
134134
assert unflattened[0]['id'] == 2
135135
assert unflattened[0]['sub1Field'] == [
@@ -274,7 +274,7 @@ def test_same_rollup(self, recwarn):
274274
unflattened = list(spreadsheet_input.unflatten())
275275
assert unflattened == [
276276
{'ocid': 1, 'id': 2, 'testC':3, 'testA': [{'id': 4, 'testB': 5}]},
277-
{'ocid': 6, 'id': 7, 'testC':8, 'testA': [{'testB': 9}, {'testB': 9}]}, # FIXME rollup with ID causes duplicates
277+
{'ocid': 6, 'id': 7, 'testC':8, 'testA': [{'testB': 9}, {'testB': 9}]}, # FIXME rollup without ID causes duplicates
278278
]
279279
# We expect no warnings
280280
assert recwarn.list == []
@@ -413,7 +413,7 @@ def test_basic_two_sub_sheets(self):
413413
spreadsheet_input.read_sheets()
414414
unflattened = list(spreadsheet_input.unflatten())
415415
assert len(unflattened) == 1
416-
assert set(unflattened[0]) == set(['custom', 'id', 'sub1Field']) # FIXME should be ordered
416+
assert list(unflattened[0]) == ['custom', 'id', 'sub1Field']
417417
assert unflattened[0]['custom'] == 1
418418
assert unflattened[0]['id'] == 2
419419
assert unflattened[0]['sub1Field'] == [

0 commit comments

Comments
 (0)