diff --git a/eyecite/utils.py b/eyecite/utils.py index b642d23..b2bb66a 100644 --- a/eyecite/utils.py +++ b/eyecite/utils.py @@ -122,7 +122,8 @@ def hash_sha256(dictionary: dict) -> int: """ # Convert the dictionary to a JSON string - json_str: str = json.dumps(dictionary, sort_keys=True) + # default needed because of dates + json_str: str = json.dumps(dictionary, sort_keys=True, default=str) # Convert the JSON string to bytes json_bytes: bytes = json_str.encode("utf-8") diff --git a/tests/test_ResolveTest.py b/tests/test_ResolveTest.py index 8461ba7..61c4898 100644 --- a/tests/test_ResolveTest.py +++ b/tests/test_ResolveTest.py @@ -104,6 +104,9 @@ def checkResolution( self.assertResolution(citations, expected_resolution_dict) + def test_issue_167(self): + self.checkResolution((0, "25 Texas L.Rev. 199")) + def test_full_resolution(self): # Test resolving a single, full citation self.checkResolution(