Skip to content

Commit db39b1e

Browse files
committed
#318 Update test code
Signed-off-by: Chin Yeung Li <[email protected]>
1 parent b917eb5 commit db39b1e

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

tests/test_util.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -290,28 +290,28 @@ def test_load_json_without_mapping(self):
290290

291291
def test_load_json_with_mapping(self):
292292
test_file = get_test_loc('load/expected_need_mapping.json')
293-
expected = [OrderedDict(
293+
expected = [dict(OrderedDict(
294294
[('about_file_path', '/load/this.ABOUT'),
295-
('version', '0.11.0'),
295+
('about_resource_path', '.'),
296296
('about_resource', '.'),
297+
('version', '0.11.0'),
297298
('name', 'AboutCode'),
298-
('about_resource_path', '.'),
299299
])
300-
]
300+
)]
301301
result = util.load_json(test_file, use_mapping=True)
302302
assert expected == result
303303

304304
def test_load_non_list_json_with_mapping(self):
305305
test_file = get_test_loc('load/not_a_list_need_mapping.json')
306306
mapping_file = get_test_loc('custom-mapping-file/mapping.config')
307-
expected = [OrderedDict(
307+
expected = [dict(OrderedDict(
308308
[('about_file_path', '/load/this.ABOUT'),
309-
('version', '0.11.0'),
309+
('about_resource_path', '.'),
310310
('about_resource', '.'),
311311
('name', 'AboutCode'),
312-
('about_resource_path', '.'),
312+
('version', '0.11.0'),
313313
])
314-
]
314+
)]
315315
result = util.load_json(test_file, use_mapping=False, mapping_file=mapping_file)
316316
assert expected == result
317317

0 commit comments

Comments
 (0)