def test_saving_state_exclude_domain_include_entity(hass_recorder):
 hass = hass_recorder({'include': {'entities': 'test.recorder'}, 'exclude': {'domains': 'test'}})
 states = _add_entities(hass, ['test.recorder', 'test2.recorder'])
 assert (len(states) == 2)

def test_saving_state_exclude_domain_include_entity ( hass_recorder ) : hass = hass_recorder ( { 'include' : { 'entities' : 'test.recorder' } , 'exclude' : { 'domains' : 'test' } } ) states = _add_entities ( hass , [ 'test.recorder' , 'test2.recorder' ] ) assert ( len ( states ) == 2 )
test saving and restoring a state .