コード例 #1
0
ファイル: test_playlistr.py プロジェクト: Gan0k/Playlistr
 def assert_video_in_list(self, videoId, relative_dir):
     script_dir = os.path.dirname(__file__)
     with open(os.path.join(script_dir, relative_dir), "r") as tracklist:
         pl = playlistr.make_playlist(tracklist.read())
         self.assertIn(videoId, pl)
コード例 #2
0
ファイル: test_playlistr.py プロジェクト: Gan0k/Playlistr
 def test_make_playlist1(self):
     tracklist = "    01. gangam style \n  \t never gonna give "
     pl = playlistr.make_playlist(tracklist)
     self.assertIn("9bZkp7q19f0", pl)
コード例 #3
0
ファイル: flaskapp.py プロジェクト: Gan0k/Playlistr
def form_post():
    pl = playlistr.make_playlist(request.form.get('text'))
    if pl is None:
        return NOT_FOUND_MSG
    else:
        return redirect(pl, code=302)