def test_artists(self): artist = Artist() album = Album(artists=[artist]) self.assertIn(artist, album.artists) with self.assertRaises(AttributeError): album.artists = None