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)
def test_make_playlist1(self): tracklist = " 01. gangam style \n \t never gonna give " pl = playlistr.make_playlist(tracklist) self.assertIn("9bZkp7q19f0", pl)
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)