diff --git a/test/data/ws_data/artist_ended.json b/test/data/ws_data/artist_ended.json new file mode 100644 index 000000000..8e8fb8c73 --- /dev/null +++ b/test/data/ws_data/artist_ended.json @@ -0,0 +1,79 @@ +{ + "name": "Serge Gainsbourg", + "sort-name": "Gainsbourg, Serge", + "isnis": [ + "0000000115935851" + ], + "life-span": { + "ended": true, + "begin": "1928-04-02", + "end": "1991-03-02" + }, + "id": "b21ef19b-c6aa-4775-90d3-3cc3e067ce6d", + "end_area": { + "sort-name": "Paris", + "name": "Paris", + "iso-3166-2-codes": [ + "FR-75" + ], + "type-id": null, + "disambiguation": "", + "id": "dc10c22b-e510-4006-8b7f-fecb4f36436e", + "type": null + }, + "begin-area": { + "disambiguation": "", + "type": null, + "id": "dc10c22b-e510-4006-8b7f-fecb4f36436e", + "name": "Paris", + "iso-3166-2-codes": [ + "FR-75" + ], + "type-id": null, + "sort-name": "Paris" + }, + "type-id": "b6e035f4-3ce9-331c-97df-83397230b0df", + "area": { + "iso-3166-1-codes": [ + "FR" + ], + "disambiguation": "", + "id": "08310658-51eb-3801-80de-5a0739207115", + "type": null, + "sort-name": "France", + "name": "France", + "type-id": null + }, + "country": "FR", + "ipis": [ + "00011123948", + "00011935702", + "00012741616" + ], + "gender": "Male", + "gender-id": "36d3d30a-839d-3eda-8cb3-29be4384e4a9", + "type": "Person", + "disambiguation": "", + "end-area": { + "sort-name": "Paris", + "name": "Paris", + "iso-3166-2-codes": [ + "FR-75" + ], + "type-id": null, + "disambiguation": "", + "id": "dc10c22b-e510-4006-8b7f-fecb4f36436e", + "type": null + }, + "begin_area": { + "disambiguation": "", + "type": null, + "id": "dc10c22b-e510-4006-8b7f-fecb4f36436e", + "name": "Paris", + "iso-3166-2-codes": [ + "FR-75" + ], + "type-id": null, + "sort-name": "Paris" + } +} diff --git a/test/test_mbjson.py b/test/test_mbjson.py index c633c6280..eefc641ee 100644 --- a/test/test_mbjson.py +++ b/test/test_mbjson.py @@ -468,22 +468,6 @@ class NullMediaTest(MBJSONTest): self.assertEqual(m, {}) -class ArtistTest(MBJSONTest): - - filename = 'artist.json' - - def test_artist(self): - m = Metadata() - artist_to_metadata(self.json_doc, m) - self.assertEqual(m['area'], 'United Kingdom') - self.assertEqual(m['beginarea'], 'Hebden Bridge') - self.assertEqual(m['begindate'], '1991-02-17') - self.assertEqual(m['gender'], 'Male') - self.assertEqual(m['musicbrainz_artistid'], 'b8a7c51f-362c-4dcb-a259-bc6e0095f0a6') - self.assertEqual(m['name'], 'Ed Sheeran') - self.assertEqual(m['type'], 'Person') - - class NullArtistTest(MBJSONTest): filename = 'artist_null.json' @@ -494,6 +478,24 @@ class NullArtistTest(MBJSONTest): self.assertEqual(m, {}) +class ArtistEndedTest(MBJSONTest): + + filename = 'artist_ended.json' + + def test_artist_ended(self): + m = Metadata() + artist_to_metadata(self.json_doc, m) + self.assertEqual(m['area'], 'France') + self.assertEqual(m['beginarea'], 'Paris') + self.assertEqual(m['begindate'], '1928-04-02') + self.assertEqual(m['endarea'], 'Paris') + self.assertEqual(m['enddate'], '1991-03-02') + self.assertEqual(m['gender'], 'Male') + self.assertEqual(m['musicbrainz_artistid'], 'b21ef19b-c6aa-4775-90d3-3cc3e067ce6d') + self.assertEqual(m['name'], 'Serge Gainsbourg') + self.assertEqual(m['type'], 'Person') + + class ArtistTranslationTest(MBJSONTest): filename = 'artist.json'