Beispiel #1
0
    def test_get_by_artist_missing(self):
        dao = mock.Mock(spec=avalon.models.ReadOnlyDao)
        dao.get_all_tracks.return_value = [self.song]

        cache = avalon.cache.TrackStore(dao).reload()
        songs = cache.get_by_artist(uuid.UUID('a15dfab4-75e6-439f-b621-5a3a9cf905d2'))
        assert 0 == len(songs)
Beispiel #2
0
    def test_get_by_artist(self):
        dao = mock.Mock(spec=avalon.models.ReadOnlyDao)
        dao.get_all_tracks.return_value = [self.song]

        cache = avalon.cache.TrackStore(dao).reload()
        songs = cache.get_by_artist(uuid.UUID("aa143f55-65e3-59f3-a1d8-36eac7024e86"))

        for song in songs:
            assert uuid.UUID("ca2e8303-69d7-53ec-907e-2f111103ba29") == song.id