def test_saving_state_include_domains(hass_recorder):
 hass = hass_recorder({'include': {'domains': 'test2'}})
 states = _add_entities(hass, ['test.recorder', 'test2.recorder'])
 assert (len(states) == 1)
 assert (hass.states.get('test2.recorder') == states[0])

def test_saving_state_include_domains ( hass_recorder ) : hass = hass_recorder ( { 'include' : { 'domains' : 'test2' } } ) states = _add_entities ( hass , [ 'test.recorder' , 'test2.recorder' ] ) assert ( len ( states ) == 1 ) assert ( hass . states . get ( 'test2.recorder' ) == states [ 0 ] )
test saving and restoring a state .