def test_air_quality_sensor_with_none_sensor_value(self):
    'Test air quality sensor.'
    device = mock_device(10, 'Family Room', 'Canary')
    location = mock_location('Home')
    data = Mock()
    data.get_reading.return_value = None
    sensor = CanarySensor(data, SENSOR_TYPES[2], location, device)
    sensor.update()
    assert (sensor.state is None)
    assert (sensor.device_state_attributes is None)
Test air quality sensor.
def test_air_quality_sensor_with_none_sensor_value(self):
    
    device = mock_device(10, 'Family Room', 'Canary')
    location = mock_location('Home')
    data = Mock()
    data.get_reading.return_value = None
    sensor = CanarySensor(data, SENSOR_TYPES[2], location, device)
    sensor.update()
    assert (sensor.state is None)
    assert (sensor.device_state_attributes is None)