def test_search_records(self):
        clt = self.client
        mgr = clt._manager
        dom = self.domain
        typ = "A"
        uri = "/domains/%s/records?type=%s" % (utils.get_id(dom), typ)
        ret_body = {"records": [{"type": typ}]}
        mgr.count = 0

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

        clt.method_get = Mock(wraps=mock_get)
        clt.search_records(dom, typ)
        calls = [call(uri), call(uri)]
        clt.method_get.assert_has_calls(calls)