def test_sort_dict_alphabetically(): actual = sort_car_models() # Order of keys should not matter, two dicts are equal if they have the # same keys and the same values. # The car models (values) need to be sorted here though expected = { 'Ford': ['Fairlane', 'Falcon', 'Festiva', 'Focus'], 'Holden': ['Barina', 'Captiva', 'Commodore', 'Trailblazer'], 'Honda': ['Accord', 'Civic', 'Jazz', 'Odyssey'], 'Jeep': ['Cherokee', 'Grand Cherokee', 'Trackhawk', 'Trailhawk'], 'Nissan': ['350Z', 'Maxima', 'Navara', 'Pulsar'], } assert actual == expected
def test_sort_dict_alphabetically(): actual = sort_car_models() # Order of keys should not matter, two dicts are equal if they have the # same keys and the same values. # The car models (values) need to be sorted here though expected = { "Ford": ["Fairlane", "Falcon", "Festiva", "Focus"], "Holden": ["Barina", "Captiva", "Commodore", "Trailblazer"], "Honda": ["Accord", "Civic", "Jazz", "Odyssey"], "Jeep": ["Cherokee", "Grand Cherokee", "Trackhawk", "Trailhawk"], "Nissan": ["350Z", "Maxima", "Navara", "Pulsar"], } assert actual == expected