Skip to content

Commit

Permalink
Fixes test fails. Left with errors
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanbc committed Feb 19, 2024
1 parent b33c0d9 commit 37ab49f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
4 changes: 2 additions & 2 deletions plexorcist.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,10 +228,10 @@ def handle_videos(self, response):

if videos and len(videos) > 0:
# Filter watched videos
watched_videos = self.filter_videos(videos=videos)
watched_videos = self.filter_videos(videos)

# Delete watched videos and send notification
self.delete_videos(watched_videos=watched_videos, media_type=media_type)
self.delete_videos(watched_videos, media_type)

def filter_videos(self, videos):
"""Filter videos"""
Expand Down
14 changes: 13 additions & 1 deletion test_plexorcist.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,19 @@ def test_delete_videos(self, mock_make_request):

# Test delete_videos method
plexorcist = Plexorcist()
plexorcist.config = {"whitelist": ["Whitelisted Title"]}
plexorcist.config = {
"plex_base": "http://example.com",
"plex_token": "token",
"ifttt_webhook": "",
"i18n": {
"removed": "Removed {0} videos, reclaimed {1} GB",
"notification": "Notification sent",
"ifttt_error": "IFTTT webhook error",
},
"whitelist": ["Whitelisted Title"],
}
plexorcist.pushbullet = MagicMock()

watched_videos = [
{
"@title": "Title",
Expand Down

0 comments on commit 37ab49f

Please sign in to comment.