Add fuzzing for book titles

This commit is contained in:
2024-01-27 00:20:15 -05:00
parent 0b3bc53704
commit 919fa1b0b4
5 changed files with 248 additions and 590 deletions

View File

@ -185,7 +185,10 @@ class Book(LongPlayScrobblableMixin):
if "pages" in data.keys() and data.get("pages") == None:
data.pop("pages")
if not isinstance(data.get("pages"), int):
if (
not isinstance(data.get("pages"), int)
and "pages" in data.keys()
):
logger.info(
f"Pages for {self} from OL expected to be int, but got {data.get('pages')}"
)