def _test_iterate(self, session, paginator, expected_count, expected_vals):
        client = CommCareHqClient('/fake/commcare-hq/url', 'fake-project', None, None)
        client.session = session

        # Iteration should do two "gets" because the first will have something in the "next" metadata field
        paginator.init()
        results = list(client.iterate('/fake/uri', paginator))
        self.assertEqual(len(results), expected_count)
        self.assertEqual([result['foo'] for result in results], expected_vals)
    def _test_iterate(self, session, paginator, expected_count, expected_vals):
        client = CommCareHqClient('/fake/commcare-hq/url', 'fake-project',
                                  None, None)
        client.session = session

        # Iteration should do two "gets" because the first will have something in the "next" metadata field
        paginator.init()
        checkpoint_manager = CheckpointManagerWithSince(None, None)
        results = list(
            client.iterate('/fake/uri',
                           paginator,
                           checkpoint_manager=checkpoint_manager))
        self.assertEqual(len(results), expected_count)
        self.assertEqual([result['foo'] for result in results], expected_vals)