@@ -0,0 +1,2624 @@
+from tests.base import ApiDBTestCase%0A%0Afrom zou.app.models.playlist import Playlist%0Afrom zou.app.services import (%0A    files_service,%0A    playlists_service,%0A    tasks_service%0A)%0A%0A%0Aclass PlaylistsServiceTestCase(ApiDBTestCase):%0A%0A    def setUp(self):%0A        super(PlaylistsServiceTestCase, self).setUp()%0A%0A        self.generate_fixture_project_status()%0A        self.generate_fixture_project_standard()%0A        self.generate_fixture_project()%0A        self.generate_fixture_asset_type()%0A        self.generate_fixture_asset()%0A        self.episode_2 = self.generate_fixture_episode(%22E02%22)%0A        self.generate_fixture_episode()%0A        self.generate_fixture_sequence()%0A        self.generate_fixture_shot()%0A        self.sequence_dict = self.sequence.serialize()%0A        self.project_dict = self.sequence.serialize()%0A%0A    def generate_fixture_playlist(self):%0A        self.playlist = Playlist.create(%0A            name=%22Playlist 1%22,%0A            shots=%7B%7D,%0A            project_id=self.project.id,%0A            episode_id=self.episode.id%0A        )%0A        Playlist.create(%0A            name=%22Playlist 2%22,%0A            shots=%7B%7D,%0A            project_id=self.project_standard.id%0A        )%0A        self.playlist = Playlist.create(%0A            name=%22Playlist 3%22,%0A            shots=%7B%7D,%0A            project_id=self.project.id,%0A            episode_id=self.episode_2.id%0A        )%0A        return self.playlist.serialize()%0A%0A    def test_get_playlist_for_project(self):%0A        self.generate_fixture_playlist()%0A        playlists = playlists_service.all_playlists_for_project(self.project.id)%0A        self.assertEquals(len(playlists), 2)%0A        self.assertTrue(%0A            %22Playlist 2%22 not in %5Bplaylists%5B0%5D%5B%22name%22%5D, playlists%5B1%5D%5B%22name%22%5D%5D%0A        )%0A%0A    def test_get_playlist_for_episode(self):%0A        self.generate_fixture_playlist()%0A        playlists = playlists_service.all_playlists_for_episode(self.episode.id)%0A        self.assertEquals(len(playlists), 1)%0A        self.assertEquals(playlists%5B0%5D%5B%22name%22%5D, %22Playlist 1%22)%0A%0A    def test_get_playlist(self):%0A        pass%0A    %22%22%22%0A    def test_retrieve_playlist_tmp_files(self):%0A    def test_get_playlist_with_preview_file_revisions(self):%0A    def test_set_preview_files_for_shots(self):%0A    def test_build_playlist_zip_file(self):%0A    def test_build_playlist_movie_file(self):%0A    def test_start_build_job(self):%0A    def test_end_build_job(self):%0A    def test_build_playlist_job(self):%0A    def test_get_playlist_file_name(self):%0A    def test_get_playlist_movie_file_path(self):%0A    def test_get_playlist_zip_file_path(self):%0A    def test_get_build_job(self):%0A    def test_remove_build_job(self):%0A    %22%22%22%0A

Add some tests to playlists service