old_contents: # -*- coding: utf-8 -*-
  from pytube import Playlist
  
  
  def test_title():
      list_key = "PLsyeobzWxl7poL9JTVyndKe62ieoN-MZ3"
      url = "https://www.youtube.com/playlist?list=" + list_key
      pl = Playlist(url)
      pl_title = pl.title()
      assert pl_title == "Python Tutorial for Beginners"
  
new_contents: # -*- coding: utf-8 -*-
  from unittest import mock
  
  from pytube import Playlist
  
  
  @mock.patch("pytube.contrib.playlist.request.get")
  def test_title(request_get):
      request_get.return_value = (
          "<title>(149) Python Tutorial for Beginners "
          "(For Absolute Beginners) - YouTube</title>"
      )
      url = "https://www.fakeurl.com/playlist?list=PLsyeobzWxl7poL9JTVyndKe62ieoN"
      pl = Playlist(url)
      pl_title = pl.title()
      assert pl_title == "(149) Python Tutorial for Beginners (For Absolute Beginners)"
  
subject: fix test_playlist.test_title