diff --git a/oai_status/list_records.py b/oai_status/list_records.py index a9cec9e..ebbfe60 100644 --- a/oai_status/list_records.py +++ b/oai_status/list_records.py @@ -80,6 +80,7 @@ def yield_records(doc: Document) -> Iterable[TagNode]: yield from yield_records(doc) if not counter.left: return + while resumption_token := get_resumption_token(doc): doc = request_list_records(setSpec, metadata_prefix, resumption_token) yield from yield_records(doc) diff --git a/tests/test_list_records.py b/tests/test_list_records.py index 7c0361e..0ee1eae 100644 --- a/tests/test_list_records.py +++ b/tests/test_list_records.py @@ -35,8 +35,9 @@ def test_list_records_limited(): def test_list_records_limited_paging(): - records = list(list_records('illustrierte.liedflugschriften', limit=125)) - assert len(records) == 125 + assert len( + list(list_records('illustrierte.liedflugschriften', limit=75)) + ) == 75 def test_entrypoint():