def test_de_json_all(self, client, artist, track): json_dict = { 'artist': artist.to_dict(), 'tracks': [track.to_dict()], 'similar_to_artists_from_history': [artist.to_dict()] } artist_event = ArtistEvent.de_json(json_dict, client) assert artist_event.artist == artist assert artist_event.tracks == [track] assert artist_event.similar_to_artists_from_history == [artist]
def test_de_json_none(self, client): assert ArtistEvent.de_json({}, client) is None