From 7c801cd44478e9edda8f05a0132c1531e899febc Mon Sep 17 00:00:00 2001 From: Rishi Diwan Date: Tue, 24 Oct 2023 12:11:55 +0530 Subject: [PATCH] OPDS2 duration import test --- tests/core/files/opds2/feed.json | 1 + tests/core/test_opds2_import.py | 1 + 2 files changed, 2 insertions(+) diff --git a/tests/core/files/opds2/feed.json b/tests/core/files/opds2/feed.json index 98491a13d8..918afa4fd1 100644 --- a/tests/core/files/opds2/feed.json +++ b/tests/core/files/opds2/feed.json @@ -16,6 +16,7 @@ "title": "Moby-Dick", "author": "Herman Melville", "identifier": "urn:isbn:978-3-16-148410-0", + "duration": 100.2, "language": "en", "publisher": { "name": "Test Publisher" diff --git a/tests/core/test_opds2_import.py b/tests/core/test_opds2_import.py index 567e57e310..8a7d1c5556 100644 --- a/tests/core/test_opds2_import.py +++ b/tests/core/test_opds2_import.py @@ -169,6 +169,7 @@ def test_opds2_importer_correctly_imports_valid_opds2_feed( assert "eng" == moby_dick_edition.language assert EditionConstants.BOOK_MEDIUM == moby_dick_edition.medium assert "Herman Melville" == moby_dick_edition.author + assert moby_dick_edition.duration == 100.2 assert 1 == len(moby_dick_edition.author_contributors) [moby_dick_author] = moby_dick_edition.author_contributors