def test_get_significant_states_minimal_response(hass_history):
    'Test that only significant states are returned.\n\n    When minimal responses is set only the first and\n    last states return a complete state.\n\n    We should get back every thermostat change that\n    includes an attribute change, but only the state updates for\n    media player (attribute changes are not significant and not returned).\n    '
    hass = hass_history
    (zero, four, states) = record_states(hass)
    hist = get_significant_states(hass, zero, four, filters=history.Filters(), minimal_response=True)
    input_state = states['media_player.test'][1]
    orig_last_changed = json.dumps(process_timestamp(input_state.last_changed), cls=JSONEncoder).replace('"', '')
    orig_state = input_state.state
    states['media_player.test'][1] = {'last_changed': orig_last_changed, 'state': orig_state}
    assert (states == hist)
Test that only significant states are returned.

When minimal responses is set only the first and
last states return a complete state.

We should get back every thermostat change that
includes an attribute change, but only the state updates for
media player (attribute changes are not significant and not returned).
def test_get_significant_states_minimal_response(hass_history):
    'Test that only significant states are returned.\n\n    When minimal responses is set only the first and\n    last states return a complete state.\n\n    We should get back every thermostat change that\n    includes an attribute change, but only the state updates for\n    media player (attribute changes are not significant and not returned).\n    '
    hass = hass_history
    (zero, four, states) = record_states(hass)
    hist = get_significant_states(hass, zero, four, filters=history.Filters(), minimal_response=True)
    input_state = states['media_player.test'][1]
    orig_last_changed = json.dumps(process_timestamp(input_state.last_changed), cls=JSONEncoder).replace('"', )
    orig_state = input_state.state
    states['media_player.test'][1] = {'last_changed': orig_last_changed, 'state': orig_state}
    assert (states == hist)