def test_get_significant_states_are_ordered(hass_history):
    'Test order of results from get_significant_states.\n\n    When entity ids are given, the results should be returned with the data\n    in the same order.\n    '
    hass = hass_history
    (zero, four, _states) = record_states(hass)
    entity_ids = ['media_player.test', 'media_player.test2']
    hist = get_significant_states(hass, zero, four, entity_ids, filters=history.Filters())
    assert (list(hist.keys()) == entity_ids)
    entity_ids = ['media_player.test2', 'media_player.test']
    hist = get_significant_states(hass, zero, four, entity_ids, filters=history.Filters())
    assert (list(hist.keys()) == entity_ids)
Test order of results from get_significant_states.

When entity ids are given, the results should be returned with the data
in the same order.
def test_get_significant_states_are_ordered(hass_history):
    'Test order of results from get_significant_states.\n\n    When entity ids are given, the results should be returned with the data\n    in the same order.\n    '
    hass = hass_history
    (zero, four, _states) = record_states(hass)
    entity_ids = ['media_player.test', 'media_player.test2']
    hist = get_significant_states(hass, zero, four, entity_ids, filters=history.Filters())
    assert (list(hist.keys()) == entity_ids)
    entity_ids = ['media_player.test2', 'media_player.test']
    hist = get_significant_states(hass, zero, four, entity_ids, filters=history.Filters())
    assert (list(hist.keys()) == entity_ids)