def setUp(self): # pylint: disable=invalid-name """Setup things to be run when tests are started.""" self.hass = get_test_home_assistant() with patch('homeassistant.core.Config.path', return_value=':memory:'): recorder.setup(self.hass, {}) self.hass.start() recorder._INSTANCE.block_till_done()
def init_recorder(self): """Initialize the recorder.""" db_uri = 'sqlite://' with patch('homeassistant.core.Config.path', return_value=db_uri): recorder.setup(self.hass, config={"recorder": {"db_url": db_uri}}) self.hass.start() recorder._INSTANCE.block_till_db_ready() self.wait_recording_done()
def setUp(self): # pylint: disable=invalid-name """Setup things to be run when tests are started.""" self.hass = get_test_home_assistant() db_uri = 'sqlite://' with patch('homeassistant.core.Config.path', return_value=db_uri): recorder.setup(self.hass, config={"recorder": {"db_url": db_uri}}) self.hass.start() recorder._INSTANCE.block_till_db_ready() self.session = recorder.Session() recorder._INSTANCE.block_till_done()
def init_recorder(self): """Initialize the recorder.""" db_uri = 'sqlite://' with patch('homeassistant.core.Config.path', return_value=db_uri): recorder.setup(self.hass, config={ "recorder": { "db_url": db_uri}}) self.hass.start() recorder._INSTANCE.block_till_db_ready() self.wait_recording_done()
def setUp(self): # pylint: disable=invalid-name """Setup things to be run when tests are started.""" self.hass = get_test_home_assistant() db_uri = 'sqlite://' with patch('homeassistant.core.Config.path', return_value=db_uri): recorder.setup(self.hass, config={ "recorder": { "db_url": db_uri}}) self.hass.start() recorder._INSTANCE.block_till_db_ready() self.session = recorder.Session() recorder._INSTANCE.block_till_done()
def setUp(self): # pylint: disable=invalid-name self.hass = get_test_home_assistant() recorder.setup(self.hass, {}) self.hass.start() recorder._INSTANCE.block_till_done()
def init_recorder(self): recorder.setup(self.hass, {}) self.hass.start() recorder._INSTANCE.block_till_done() self.init_rec = True
def init_recorder(self): recorder.setup(self.hass, {}) self.hass.start() self.wait_recording_done()
def init_recorder(self): """Initialize the recorder.""" with patch('homeassistant.core.Config.path', return_value=':memory:'): recorder.setup(self.hass, {}) self.hass.start() self.wait_recording_done()
def init_recorder(self): """Initialize the recorder.""" recorder.setup(self.hass, {}) self.hass.start() self.wait_recording_done()
def setUp(self): # pylint: disable=invalid-name """Setup things to be run when tests are started.""" self.hass = get_test_home_assistant() recorder.setup(self.hass, {}) self.hass.start() recorder._INSTANCE.block_till_done()