hbmartin commited on
Commit
1e829ab
·
1 Parent(s): bbb9b89

fix existing tests

Browse files
Files changed (1) hide show
  1. tests/test_cli.py +2 -1
tests/test_cli.py CHANGED
@@ -68,7 +68,7 @@ def test_download_caption_with_language_found(youtube):
68
  caption.download = MagicMock(return_value="file_path")
69
  youtube.captions = CaptionQuery([caption])
70
  cli.download_caption(youtube, "en")
71
- caption.download.assert_called_with(title="video title")
72
 
73
 
74
  @mock.patch("pytube.cli.YouTube")
@@ -181,6 +181,7 @@ def test_download_by_resolution(youtube):
181
 
182
  @mock.patch("pytube.cli.Playlist")
183
  def test_download_with_playlist(playlist):
 
184
  parser = argparse.ArgumentParser()
185
  args = parse_args(parser, ["https://www.youtube.com/playlist?list=PLyn"])
186
  cli._parse_args = MagicMock(return_value=args)
 
68
  caption.download = MagicMock(return_value="file_path")
69
  youtube.captions = CaptionQuery([caption])
70
  cli.download_caption(youtube, "en")
71
+ caption.download.assert_called_with(title="video title", output_path=None)
72
 
73
 
74
  @mock.patch("pytube.cli.YouTube")
 
181
 
182
  @mock.patch("pytube.cli.Playlist")
183
  def test_download_with_playlist(playlist):
184
+ cli.safe_filename = MagicMock(return_value="safe_title")
185
  parser = argparse.ArgumentParser()
186
  args = parse_args(parser, ["https://www.youtube.com/playlist?list=PLyn"])
187
  cli._parse_args = MagicMock(return_value=args)