Skip to content

Commit

Permalink
Fix test comparison (ThePalaceProject#1955)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathangreen authored Jul 31, 2024
1 parent d131258 commit adb731f
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions tests/manager/api/test_overdrive.py
Original file line number Diff line number Diff line change
Expand Up @@ -2663,17 +2663,20 @@ def test_sync_patron_activity_creates_local_loans(

# We have recorded a new DeliveryMechanism associated with
# each loan.
mechanisms = []
for loan in loans.values():
if loan.fulfillment:
mechanism = loan.fulfillment.delivery_mechanism
mechanisms.append((mechanism.content_type, mechanism.drm_scheme))
assert [
mechanisms = {
(
loan.fulfillment.delivery_mechanism.content_type,
loan.fulfillment.delivery_mechanism.drm_scheme,
)
for loan in loans.values()
if loan.fulfillment
}
assert {
(Representation.EPUB_MEDIA_TYPE, DeliveryMechanism.NO_DRM),
(Representation.EPUB_MEDIA_TYPE, DeliveryMechanism.ADOBE_DRM),
(Representation.PDF_MEDIA_TYPE, DeliveryMechanism.ADOBE_DRM),
(Representation.EPUB_MEDIA_TYPE, DeliveryMechanism.ADOBE_DRM),
] == mechanisms
} == mechanisms

# There are no holds.
assert {} == holds
Expand Down

0 comments on commit adb731f

Please sign in to comment.