Browse Source

Add a test/example for videos in subfolder

master
Zykino 2 years ago
parent
commit
a1ceeef4f1
1 changed files with 11 additions and 0 deletions
  1. +11
    -0
      autoupload_test.py

+ 11
- 0
autoupload_test.py View File

@ -22,6 +22,17 @@ Episode1 = {}
self.assertEqual(auto.nextVideo(self.platform1), "/tmp/Episode1.mp4")
self.assertEqual(auto.nextVideo(self.platform2), "/tmp/Episode1.mp4")
def test_nextVideoSubfolder(self):
with TestFileContent(
"""[videos]
"subfolder/Episode1" = {}
"""
) as videoFile:
auto = autoupload.AutoUpload(videoFile.filename)
self.assertEqual(auto.nextVideo(self.platform1), "/tmp/subfolder/Episode1.mp4")
self.assertEqual(auto.nextVideo(self.platform2), "/tmp/subfolder/Episode1.mp4")
def test_success(self):
with TestFileContent(
"""[videos]

Loading…
Cancel
Save