From 027c5f475464ea1759619baf8e952430934c86f8 Mon Sep 17 00:00:00 2001 From: jrhoads Date: Wed, 2 Feb 2022 16:53:38 -0500 Subject: [PATCH] Add test for decoding the resumption token --- tests/unit/test_oai_server.py | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 tests/unit/test_oai_server.py diff --git a/tests/unit/test_oai_server.py b/tests/unit/test_oai_server.py new file mode 100644 index 0000000..7e2ab72 --- /dev/null +++ b/tests/unit/test_oai_server.py @@ -0,0 +1,11 @@ +import oaipmh.server + + +def test_decode_resumption_token_raises_no_error(): + EXAMPLE_RESUMPTION = "metadataPrefix%3Ddatacite%26set%3DSND.BOLIN%26paging_cursor%3DMTU4NTU2NDkxMTAwMCwxMC4xNzA0My9zd2VydXMtMjAxNC1kMTNj%26cursor%3D1" + try: + oaipmh.server.decodeResumptionToken(EXAMPLE_RESUMPTION) + except Exception as exc: + assert False, f"DecodingResumptionToken raised an exception {exc}" + +