'Test `available` attribute when `libc` has no `tee` support'

def test_unavailable_in_libc(self):

    class LibC(object, ):
        'A    fake    `libc`    object    tracking    `tee`    attribute    access'
        def __init__(self):
            self.tee_retrieved = False
        @property
        def tee(self):
            self.tee_retrieved = True
            raise AttributeError
    libc = LibC()
    mock_cdll = mock.Mock(return_value=libc)
    with mock.patch('ctypes.CDLL', new=mock_cdll):
        new_tee = type(tee)()
        self.assertFalse(new_tee.available)
    libc_name = ctypes.util.find_library('c')
    mock_cdll.assert_called_once_with(libc_name, use_errno=True)
    self.assertTrue(libc.tee_retrieved)
