From e146aec2613f869c4c21b50d33e358b6c00d0bd9 Mon Sep 17 00:00:00 2001 From: Hellow2 Date: Thu, 30 Mar 2023 10:52:31 +0200 Subject: [PATCH] updated tests --- .../pages/download_center/__init__.py | 2 ++ src/tests/test_download.py | 23 ++++++------------- 2 files changed, 9 insertions(+), 16 deletions(-) diff --git a/src/music_kraken/pages/download_center/__init__.py b/src/music_kraken/pages/download_center/__init__.py index a3a93fa..5adfb95 100644 --- a/src/music_kraken/pages/download_center/__init__.py +++ b/src/music_kraken/pages/download_center/__init__.py @@ -1,3 +1,5 @@ from . import search +from . import download +Download = download.Download Search = search.Search diff --git a/src/tests/test_download.py b/src/tests/test_download.py index 8768998..010add3 100644 --- a/src/tests/test_download.py +++ b/src/tests/test_download.py @@ -10,20 +10,16 @@ from music_kraken.pages.download_center import page_attributes class TestPageSelection(unittest.TestCase): def test_no_shady_pages(self): - search = download_center.Search( - "Hello World", - exclude_shady=True, - dry=True + search = download_center.Download( + exclude_shady=True ) for page in search.pages: self.assertNotIn(page, page_attributes.SHADY_PAGES) def test_excluding(self): - search = download_center.Search( - "Hello World", - exclude_pages=set((pages.EncyclopaediaMetallum,)), - dry=True + search = download_center.Download( + exclude_pages=set((pages.EncyclopaediaMetallum,)) ) for page in search.pages: @@ -31,20 +27,15 @@ class TestPageSelection(unittest.TestCase): def test_audio_one(self): - search = download_center.Search( - "Hello World", - exclude_shady=True, - dry=True + search = download_center.Download( + exclude_shady=True ) for audio_page in search.audio_pages: self.assertIn(audio_page, page_attributes.AUDIO_PAGES) def test_audio_two(self): - search = download_center.Search( - "Hello World", - dry=True - ) + search = download_center.Download() for audio_page in search.audio_pages: self.assertIn(audio_page, page_attributes.AUDIO_PAGES)