Skip to content

Commit

Permalink
test(models): Adds test for nominative reporter equality (freelawproj…
Browse files Browse the repository at this point in the history
  • Loading branch information
mattdahl committed Jul 15, 2023
1 parent 5626b16 commit c80526f
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/test_ModelsTest.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,20 @@ def test_citation_comparison_with_different_source_text(self):
self.assertEqual(hash(citations[0]), hash(citations[1]))
print("✓")

def test_citation_comparison_with_nominative_reporter(self):
"""Are two citation objects equal when their attributes are
the same, even if one of them has a nominative reporter?"""
citations = [
get_citations("5 U.S. 137")[0],
get_citations("5 U.S. (1 Cranch) 137")[0],
]
print(
"Testing citation comparison with nominative reporter...", end=" "
)
self.assertEqual(citations[0], citations[1])
self.assertEqual(hash(citations[0]), hash(citations[1]))
print("✓")

def test_citation_comparison_with_different_reporter(self):
"""Are two citation objects different when they have different
reporters, even if their other attributes are the same?
Expand Down

0 comments on commit c80526f

Please sign in to comment.