Skip to content

Commit

Permalink
Add test for new OD endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
ping committed Jul 8, 2023
1 parent 85af55a commit ed5999a
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions tests/overdrive_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,3 +151,32 @@ def test_library_media_availability(self):
with self.assertRaises(requests.HTTPError) as context:
self.client.library_media_availability("brooklyn", "2006069")
self.assertEqual(context.exception.response.status_code, 404)

def test_library_media(self):
media = self.client.library_media("lapl", "7017021")

for k in (
"id",
"title",
"sortTitle",
"description",
"publishDate",
"type",
"formats",
"covers",
"languages",
"creators",
"subjects",
"isAdvantageFiltered",
"youngAdultEligible",
"juvenileEligible",
"visitorEligible",
"isRecommendableToLibrary",
"isHoldable",
"isOwned",
"isFastlane",
"isAvailable",
"isBundledChild",
):
with self.subTest(key=k):
self.assertIn(k, media, msg=f'"{k}" not found')

0 comments on commit ed5999a

Please sign in to comment.