Tests ignore edition openlibrary connector code

also removes print statements oops
This commit is contained in:
Mouse Reeve
2021-03-13 10:11:13 -08:00
parent 414dd6bd20
commit 76f1643269
2 changed files with 10 additions and 4 deletions

View File

@ -161,21 +161,17 @@ def ignore_edition(edition_data):
""" don't load a million editions that have no metadata """
# an isbn, we love to see it
if edition_data.get("isbn_13") or edition_data.get("isbn_10"):
print(edition_data.get("isbn_10"))
return False
# grudgingly, oclc can stay
if edition_data.get("oclc_numbers"):
print(edition_data.get("oclc_numbers"))
return False
# if it has a cover it can stay
if edition_data.get("covers"):
print(edition_data.get("covers"))
return False
# keep non-english editions
if edition_data.get("languages") and "languages/eng" not in str(
edition_data.get("languages")
):
print(edition_data.get("languages"))
return False
return True