aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_downloader.py
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@unit193.net>2021-03-13 16:26:30 -0500
committerLibravatarUnit 193 <unit193@unit193.net>2021-03-13 16:26:30 -0500
commit3201d77a148367d739862b4f07868a76eaeb7cb1 (patch)
tree78b8d71633ec000672a84ad0bbbddd0513ae2d30 /test/test_downloader.py
parentfc83315c164afd74734adf27e0f7fec2011904aa (diff)
New upstream version 1.17.0.upstream/1.17.0
Diffstat (limited to 'test/test_downloader.py')
-rw-r--r--test/test_downloader.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/test_downloader.py b/test/test_downloader.py
index 99cfb62..42b5c72 100644
--- a/test/test_downloader.py
+++ b/test/test_downloader.py
@@ -1,7 +1,7 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
-# Copyright 2018-2020 Mike Fährmann
+# Copyright 2018-2021 Mike Fährmann
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
@@ -74,7 +74,7 @@ class TestDownloaderModule(unittest.TestCase):
self.assertEqual(downloader.find(1234) , None)
self.assertEqual(downloader.find(None) , None)
- @patch("importlib.import_module")
+ @patch("builtins.__import__")
def test_cache(self, import_module):
import_module.return_value = MockDownloaderModule()
downloader.find("http")
@@ -86,14 +86,14 @@ class TestDownloaderModule(unittest.TestCase):
downloader.find("ytdl")
self.assertEqual(import_module.call_count, 3)
- @patch("importlib.import_module")
+ @patch("builtins.__import__")
def test_cache_http(self, import_module):
import_module.return_value = MockDownloaderModule()
downloader.find("http")
downloader.find("https")
self.assertEqual(import_module.call_count, 1)
- @patch("importlib.import_module")
+ @patch("builtins.__import__")
def test_cache_https(self, import_module):
import_module.return_value = MockDownloaderModule()
downloader.find("https")