Add test for equality with ordering changes of artists
This commit is contained in:
parent
b24d883db9
commit
69e6d5dc92
@ -91,6 +91,13 @@ class AlbumTest(unittest.TestCase):
|
||||
album2 = Album(artists=artists)
|
||||
self.assertEqual(album1, album2)
|
||||
|
||||
def test_eq_artists_order(self):
|
||||
artist1 = Artist(name=u'name1')
|
||||
artist2 = Artist(name=u'name2')
|
||||
album1 = Album(artists=[artist1, artist2])
|
||||
album2 = Album(artists=[artist2, artist1])
|
||||
self.assertEqual(album1, album2)
|
||||
|
||||
def test_eq_num_tracks(self):
|
||||
album1 = Album(num_tracks=2)
|
||||
album2 = Album(num_tracks=2)
|
||||
@ -241,6 +248,13 @@ class TrackTest(unittest.TestCase):
|
||||
track2 = Track(artists=artists)
|
||||
self.assertEqual(track1, track2)
|
||||
|
||||
def test_eq_artists_order(self):
|
||||
artist1 = Artist(name=u'name1')
|
||||
artist2 = Artist(name=u'name2')
|
||||
track1 = Track(artists=[artist1, artist2])
|
||||
track2 = Track(artists=[artist2, artist1])
|
||||
self.assertEqual(track1, track2)
|
||||
|
||||
def test_eq_album(self):
|
||||
album = Album()
|
||||
track1 = Track(album=album)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user