From d87b77f1bdcab6ff64ed0cf1f671c9e9c482aab5 Mon Sep 17 00:00:00 2001 From: Danny Hermes Date: Fri, 14 Oct 2016 17:08:41 -0700 Subject: [PATCH] Adding public next_page() to Iterator. The previous implementation may catch users off guard since the iterator.page access may also update the value before access. In addition, this PR removed the _update_page() / next_page() subclass behavior in _BlobIterator. Over-riding that method was never intended. Instead makes a non-public class attribute _PAGE_CLASS that can be replaced with Page subclasses. This can be revisited if more implementations require custom behavior on Page creation / Page.__init__. --- packages/google-cloud-resource-manager/unit_tests/test_client.py | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/google-cloud-resource-manager/unit_tests/test_client.py b/packages/google-cloud-resource-manager/unit_tests/test_client.py index 8eb58e730f07..a6c35c19660d 100644 --- a/packages/google-cloud-resource-manager/unit_tests/test_client.py +++ b/packages/google-cloud-resource-manager/unit_tests/test_client.py @@ -68,6 +68,7 @@ def dummy_response(): iterator = self._makeOne(client) iterator._get_next_page_response = dummy_response + iterator.next_page() page = iterator.page self.assertEqual(page.num_items, 1) project = iterator.next()