'Test turn on fan with night mode.'

def test_dyson_turn_night_mode(self):

    device = _get_device_on()
    component = dyson.DysonPureCoolLinkDevice(self.hass, device)
    self.assertFalse(component.should_poll)
    component.night_mode(True)
    set_config = device.set_configuration
    set_config.assert_called_with(night_mode=NightMode.NIGHT_MODE_ON)
    component.night_mode(False)
    set_config = device.set_configuration
    set_config.assert_called_with(night_mode=NightMode.NIGHT_MODE_OFF)
