'Test the Moon sensor.'

@patch('homeassistant.components.sensor.moon.dt_util.utcnow', return_value=DAY1)
def test_moon_day1(self, mock_request):

    config = {'sensor': {'platform': 'moon', 'name': 'moon_day1'}}
    assert setup_component(self.hass, 'sensor', config)
    state = self.hass.states.get('sensor.moon_day1')
    self.assertEqual(state.state, 'Waxing    crescent')
