def setUp(self): SimpleRepositoryTest.setUp(self) try: self.playlist = libmgr.createPlaylist("Favorite Songs") except DBConflictError: self.playlist = ( self.sqlaSession.query(libmgr.Playlist).filter(libmgr.Playlist.name == "Favorite Songs").one() )
def createPlaylist(self): dialog = addPlaylistDialog() if not dialog.exec_(): return libmgr.createPlaylist(dialog.ui.nameInput.text())