Skip to content

Commit

Permalink
Mypy fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
RishiDiwanTT committed Aug 24, 2023
1 parent cf86af3 commit d1d5769
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/api/feed_protocol/test_opds_acquisition_feed.py
Original file line number Diff line number Diff line change
Expand Up @@ -912,12 +912,12 @@ def test_active_loans_for_with_holds(self, db: DatabaseTransactionFixture):
def test_single_entry_loans_feed_errors(self, db: DatabaseTransactionFixture):
with pytest.raises(ValueError) as raised:
# Mandatory loans item was missing
OPDSAcquisitionFeed.single_entry_loans_feed(None, None)
OPDSAcquisitionFeed.single_entry_loans_feed(None, None) # type: ignore[arg-type]
assert str(raised.value) == "Argument 'item' must be non-empty"

with pytest.raises(ValueError) as raised:
# Mandatory loans item was incorrect
OPDSAcquisitionFeed.single_entry_loans_feed(None, object())
OPDSAcquisitionFeed.single_entry_loans_feed(None, object()) # type: ignore[arg-type]
assert "Argument 'item' must be an instance of" in str(raised.value)

def test_single_entry_loans_feed_default_annotator(
Expand Down Expand Up @@ -946,7 +946,7 @@ def test_single_entry_with_edition(self, db: DatabaseTransactionFixture):

with patch.object(OPDSAcquisitionFeed, "_create_entry") as mock:
OPDSAcquisitionFeed.single_entry(
work.presentation_edition, annotator, even_if_no_license_pool=True
work.presentation_edition, annotator, even_if_no_license_pool=True # type: ignore[arg-type]
)

assert mock.call_count == 1
Expand Down

0 comments on commit d1d5769

Please sign in to comment.