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

def setUp(self):

    self.hass = get_test_home_assistant()
    mock_component(self.hass, 'group')
    setup_component(self.hass, sun.DOMAIN, {sun.DOMAIN: {sun.CONF_ELEVATION: 0}})
    self.calls = []
    @callback
    def record_call(service):
        'Call    recorder.'
        self.calls.append(service)
    self.hass.services.register('test', 'automation', record_call)
