def test_equality(self, album, pager): a = ArtistAlbums([album], pager) b = ArtistAlbums([], pager) c = ArtistAlbums([album], pager) assert a != b assert hash(a) != hash(b) assert a is not b assert a == c
def artist_albums(album, pager): return ArtistAlbums([album], pager)
def test_de_json_all(self, client, album, pager): json_dict = {'albums': [album.to_dict()], 'pager': pager.to_dict()} artist_albums = ArtistAlbums.de_json(json_dict, client) assert artist_albums.albums == [album] assert artist_albums.pager == pager
def test_de_json_none(self, client): assert ArtistAlbums.de_json({}, client) is None