Make test more reliable: check a static album not a dynamic one which may not have any tags

This commit is contained in:
Hugo 2019-02-10 11:58:40 +02:00
parent bfd3ffe06c
commit f32848160c

View file

@ -12,10 +12,10 @@ from .test_pylast import TestPyLastWithLastFm
class TestPyLastAlbum(TestPyLastWithLastFm):
def test_album_tags_are_topitems(self):
# Arrange
albums = self.network.get_user("RJ").get_top_albums()
album = self.network.get_album("Test Artist", "Test Album")
# Act
tags = albums[0].item.get_top_tags(limit=1)
tags = album.get_top_tags(limit=1)
# Assert
self.assertGreater(len(tags), 0)