'Setup things to be run when tests are started.'

def setUp(self):

    self.hass = get_test_home_assistant()
    init_recorder_component(self.hass)
    mock_http_component(self.hass)
    self.hass.config.components |= set(['frontend', 'recorder', 'api'])
    with patch('homeassistant.components.logbook.register_built_in_panel'):
        assert setup_component(self.hass, logbook.DOMAIN, self.EMPTY_CONFIG)
    self.hass.start()
