def test_manager_list_all(self):
        clt = self.client
        mgr = clt._manager
        fake_name = utils.random_unicode()
        ret_body = {"domains": [{"name": fake_name}]}
        uri_string_next = utils.random_unicode()
        next_uri = "%s/domains/%s" % (example_uri, uri_string_next)
        mgr.count = 0

        def mock_get(uri):
            if mgr.count:
                return ({}, ret_body)
            mgr.count += 1
            ret = {"totalEntries": 2,
                    "links": [
                        {"href": next_uri,
                         "rel": "next"}]}
            ret.update(ret_body)
            return ({}, ret)

        clt.method_get = Mock(wraps=mock_get)
        ret = mgr._list(example_uri, list_all=True)
        self.assertEqual(len(ret), 2)