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

def setup_method(self):

    self.hass = get_test_home_assistant()
    setup_component(self.hass, http.DOMAIN, {http.DOMAIN: {http.CONF_SERVER_PORT: get_test_instance_port()}})
    config = {ip.DOMAIN: {'platform': 'test'}, 'camera': {'platform': 'demo'}}
    setup_component(self.hass, ip.DOMAIN, config)
    state = self.hass.states.get('camera.demo_camera')
    self.url = '{0}{1}'.format(self.hass.config.api.base_url, state.attributes.get(ATTR_ENTITY_PICTURE))
