'Test the default setup.'

@patch('yahoo_finance.Base._request', return_value=json.loads(load_fixture('yahoo_finance.json')))
def test_default_setup(self, mock_request):

    with assert_setup_component(1, sensor.DOMAIN):
        assert setup_component(self.hass, sensor.DOMAIN, {'sensor': VALID_CONFIG})
    state = self.hass.states.get('sensor.yhoo')
    self.assertEqual('41.69', state.attributes.get('open'))
    self.assertEqual('41.79', state.attributes.get('prev_close'))
    self.assertEqual('YHOO', state.attributes.get('unit_of_measurement'))
