Fix #602
Tests were not made correctly to catch the change in 2c3a2566cc
This has now been corrected
This commit is contained in:
parent
bb4be306cc
commit
2eca743f20
@ -668,7 +668,9 @@ class ComicVineTalker(ComicTalker):
|
||||
md.story_arcs.append(arc["name"])
|
||||
|
||||
for person in issue.get("person_credits", []):
|
||||
md.add_credit(person["name"], person["role"].title().strip(), False)
|
||||
roles = utils.split(person.get("role", ""), ",")
|
||||
for role in roles:
|
||||
md.add_credit(person["name"], role.title(), False)
|
||||
|
||||
md.volume = utils.xlate_int(issue.get("volume"))
|
||||
if self.use_series_start_as_volume:
|
||||
|
@ -69,7 +69,7 @@ cv_issue_result: dict[str, Any] = {
|
||||
"id": 57222,
|
||||
"name": "Esteve Polls",
|
||||
"site_detail_url": "https://comicvine.gamespot.com/esteve-polls/4040-57222/",
|
||||
"role": "artist",
|
||||
"role": "artist, writer",
|
||||
},
|
||||
{
|
||||
"api_detail_url": "https://comicvine.gamespot.com/api/person/4040-48472/",
|
||||
@ -226,8 +226,12 @@ cv_md = comicapi.genericmetadata.GenericMetadata(
|
||||
teams=set(),
|
||||
locations=set(),
|
||||
credits=[
|
||||
comicapi.genericmetadata.Credit(person=x["name"], role=x["role"].title(), primary=False)
|
||||
for x in cv_issue_result["results"]["person_credits"]
|
||||
comicapi.genericmetadata.Credit(primary=False, person="Dara Naraghi", role="Writer"),
|
||||
comicapi.genericmetadata.Credit(primary=False, person="Esteve Polls", role="Artist"),
|
||||
comicapi.genericmetadata.Credit(primary=False, person="Esteve Polls", role="Writer"),
|
||||
comicapi.genericmetadata.Credit(primary=False, person="Neil Uyetake", role="Letterer"),
|
||||
comicapi.genericmetadata.Credit(primary=False, person="Sam Kieth", role="Cover"),
|
||||
comicapi.genericmetadata.Credit(primary=False, person="Ted Adams", role="Editor"),
|
||||
],
|
||||
tags=set(),
|
||||
pages=[],
|
||||
|
@ -42,6 +42,7 @@ def test_fetch_issues_in_series(comicvine_api, comic_cache):
|
||||
def test_fetch_issue_data_by_issue_id(comicvine_api):
|
||||
result = comicvine_api.fetch_comic_data(140529)
|
||||
result.notes = None
|
||||
|
||||
assert result == testing.comicvine.cv_md
|
||||
|
||||
|
||||
|
@ -49,6 +49,17 @@ def test_save(
|
||||
# Read the CBZ
|
||||
md = tmp_comic.read_metadata("cr")
|
||||
|
||||
# This is inserted here because otherwise several other tests
|
||||
# unrelated to comicvine need to be re-worked
|
||||
md_saved.credits.insert(
|
||||
1,
|
||||
{
|
||||
"person": "Esteve Polls",
|
||||
"primary": False,
|
||||
"role": "Writer",
|
||||
},
|
||||
)
|
||||
|
||||
# Validate that we got the correct metadata back
|
||||
assert md == md_saved
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user