Skip to content

Commit

Permalink
Merge pull request #168 from cbrew/main
Browse files Browse the repository at this point in the history
  • Loading branch information
mlissner authored Feb 27, 2024
2 parents cc28d36 + e1b1102 commit ac332c4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion eyecite/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
3 changes: 3 additions & 0 deletions tests/test_ResolveTest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit ac332c4

Please sign in to comment.