From cb018894442ce650edb56505562616adfb29ba3d Mon Sep 17 00:00:00 2001 From: Wolfgang Fahl Date: Thu, 28 Dec 2023 15:38:20 +0100 Subject: [PATCH] fixes tests and sets's debug to False for location test --- tests/test_loctime.py | 2 +- tests/test_volumeparser.py | 30 ++++++++++++++++-------------- 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/tests/test_loctime.py b/tests/test_loctime.py index 002af41..b738870 100644 --- a/tests/test_loctime.py +++ b/tests/test_loctime.py @@ -15,7 +15,7 @@ class TestLoctimeParser(Basetest): Test parsing loctime entries pages """ - def setUp(self, debug=True, profile=True): + def setUp(self, debug=False, profile=True): """ setUp the test case """ diff --git a/tests/test_volumeparser.py b/tests/test_volumeparser.py index 9038c7f..ae5723a 100644 --- a/tests/test_volumeparser.py +++ b/tests/test_volumeparser.py @@ -275,23 +275,25 @@ def test_vol3264(self): vol_number = 3264 record, _soup = self.volumeParser.parse_volume(vol_number) debug = self.debug - # debug=True + #debug=True if debug: print(json.dumps(record, indent=2)) expected = { - "volume_number": "Vol-3264", - "urn": "urn:nbn:de:0074-3264-7", - "year": "2022", - "ceurpubdate": "2022-11-05", - "acronym": "HEDA 2022", - "voltitle": "The International Health Data Workshop HEDA 2022", - "title": "Proceedings of The International Health Data Workshop", - "loctime": "Bergen, Norway, June 26th-27th, 2022", - "colocated": "Petri Nets 2022", - "h1": "HEDA 2022 The International Health Data Workshop HEDA 2022", - "homepage": "", - "h3": "Proceedings of The International Health Data Workshop co-located with 10th International Conference on Petrinets (Petri Nets 2022)", - } + "volume_number": "Vol-3264", + "urn": "urn:nbn:de:0074-3264-7", + "year": "2022", + "ceurpubdate": "2022-11-05", + "acronym": "HEDA 2022", + "voltitle": "The International Health Data Workshop HEDA 2022", + "title": "Proceedings of The International Health Data Workshop", + "loctime": "Bergen, Norway, June 26th-27th, 2022", + "colocated": "Petri Nets 2022", + "h1": "HEDA 2022 The International Health Data Workshop HEDA 2022", + "homepage": "", + "h3": "Proceedings of The International Health Data Workshop co-located with 10th International Conference on Petrinets (Petri Nets 2022)", + "urn_check_digit": 7, + "urn_ok": True +} self.assertEqual(expected, record) def test_volume_caching(self):