diff --git a/tests/manager/api/test_overdrive.py b/tests/manager/api/test_overdrive.py index e378691ce..a2a167f53 100644 --- a/tests/manager/api/test_overdrive.py +++ b/tests/manager/api/test_overdrive.py @@ -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