示例#1
0
    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
示例#2
0
def artist_albums(album, pager):
    return ArtistAlbums([album], pager)
示例#3
0
    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
示例#4
0
 def test_de_json_none(self, client):
     assert ArtistAlbums.de_json({}, client) is None