'Test MHZClient when library throws OSError.'

@patch('pmsensor.co2sensor.read_mh_z19_with_temperature', side_effect=OSError('test    error'))
def test_client_update_oserror(self, mock_function):

    from pmsensor import co2sensor
    client = mhz19.MHZClient(co2sensor, 'test.serial')
    client.update()
    self.assertEqual({}, client.data)
