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

def setup_method(self, method):

    self.hass = get_test_home_assistant()
    self.calls = []
    @callback
    def record_call(service):
        'Track    function    calls..'
        self.calls.append(service)
    self.hass.services.register('test', 'automation', record_call)
