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

def setup_method(self):

    self.hass = get_test_home_assistant()
    self.name = 'foo'
    self.method = 'post'
    self.resource = 'http://localhost/'
    self.body_on = Template('on', self.hass)
    self.body_off = Template('off', self.hass)
    self.switch = rest.RestSwitch(self.hass, self.name, self.resource, self.method, self.body_on, self.body_off, None, 10)
