mirror of
https://github.com/xtream1101/humblebundle-downloader.git
synced 2024-11-20 08:49:17 +01:00
Added tests to run in ci. Updated tests.
This commit is contained in:
parent
c8aba1179a
commit
c107b65e01
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,3 +1,4 @@
|
||||
*egg-info
|
||||
__pycache__
|
||||
*cookies.txt
|
||||
.tox/
|
||||
|
@ -37,7 +37,6 @@ class DownloadLibrary:
|
||||
platform_include = []
|
||||
self.platform_include = list(map(str.lower, platform_include))
|
||||
|
||||
self.cache_file = os.path.join(library_path, '.cache.json')
|
||||
self.purchase_keys = purchase_keys
|
||||
self.trove = trove
|
||||
self.update = update
|
||||
@ -59,6 +58,7 @@ class DownloadLibrary:
|
||||
|
||||
def start(self):
|
||||
|
||||
self.cache_file = os.path.join(self.library_path, '.cache.json')
|
||||
self.cache_data = self._load_cache_data(self.cache_file)
|
||||
self.purchase_keys = self.purchase_keys if self.purchase_keys else self._get_purchase_keys() # noqa: E501
|
||||
|
||||
|
@ -6,7 +6,6 @@ from humblebundle_downloader.download_library import DownloadLibrary
|
||||
###
|
||||
def test_include_logic_has_values():
|
||||
dl = DownloadLibrary(
|
||||
'fake_cookie_path',
|
||||
'fake_library_path',
|
||||
ext_include=['pdf', 'EPub'],
|
||||
)
|
||||
@ -18,7 +17,6 @@ def test_include_logic_has_values():
|
||||
|
||||
def test_include_logic_empty():
|
||||
dl = DownloadLibrary(
|
||||
'fake_cookie_path',
|
||||
'fake_library_path',
|
||||
ext_include=[],
|
||||
)
|
||||
@ -30,7 +28,6 @@ def test_include_logic_empty():
|
||||
|
||||
def test_exclude_logic_has_values():
|
||||
dl = DownloadLibrary(
|
||||
'fake_cookie_path',
|
||||
'fake_library_path',
|
||||
ext_exclude=['pdf', 'EPub'],
|
||||
)
|
||||
@ -42,7 +39,6 @@ def test_exclude_logic_has_values():
|
||||
|
||||
def test_exclude_logic_empty():
|
||||
dl = DownloadLibrary(
|
||||
'fake_cookie_path',
|
||||
'fake_library_path',
|
||||
ext_exclude=[],
|
||||
)
|
||||
@ -57,7 +53,6 @@ def test_exclude_logic_empty():
|
||||
###
|
||||
def test_download_platform_filter_none():
|
||||
dl = DownloadLibrary(
|
||||
'fake_cookie_path',
|
||||
'fake_library_path',
|
||||
platform_include=None,
|
||||
)
|
||||
@ -67,7 +62,6 @@ def test_download_platform_filter_none():
|
||||
|
||||
def test_download_platform_filter_blank():
|
||||
dl = DownloadLibrary(
|
||||
'fake_cookie_path',
|
||||
'fake_library_path',
|
||||
platform_include=[],
|
||||
)
|
||||
@ -77,7 +71,6 @@ def test_download_platform_filter_blank():
|
||||
|
||||
def test_download_platform_filter_audio():
|
||||
dl = DownloadLibrary(
|
||||
'fake_cookie_path',
|
||||
'fake_library_path',
|
||||
platform_include=['audio'],
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user