예제 #1
0
    def test_get_by_album_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_album(uuid.UUID('daa612e8-daa8-49a0-8b14-6ee85720fb1c'))
        assert 0 == len(songs)
예제 #2
0
    def test_get_by_album(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_album(uuid.UUID("350c49d9-fa38-585a-a0d9-7343c8b910ed"))

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