def test_lists_are_correctly_returned(self):
        def _make_queue():
            q = queue.Queue()
            q.put(({}, None))
            return q

        with mock.patch.object(thread, 'SessionThread'):
            p = pool.Pool(None)

        # Set up real queues.
        p._response_queue = _make_queue()
        p._exc_queue = _make_queue()

        excs = list(p.exceptions())
        assert len(excs) == 1
        for exc in excs:
            assert isinstance(exc, pool.ThreadException)

        resps = list(p.responses())
        assert len(resps) == 1
        for resp in resps:
            assert isinstance(resp, pool.ThreadResponse)
Ensure that exceptions and responses return correct lists.
dataset/ETHPy150Open sigmavirus24/requests-toolbelt/tests/threaded/test_pool.py/TestPool.test_lists_are_correctly_returned