updated tests
This commit is contained in:
parent
658837850c
commit
e146aec261
@ -1,3 +1,5 @@
|
|||||||
from . import search
|
from . import search
|
||||||
|
from . import download
|
||||||
|
|
||||||
|
Download = download.Download
|
||||||
Search = search.Search
|
Search = search.Search
|
||||||
|
@ -10,20 +10,16 @@ from music_kraken.pages.download_center import page_attributes
|
|||||||
|
|
||||||
class TestPageSelection(unittest.TestCase):
|
class TestPageSelection(unittest.TestCase):
|
||||||
def test_no_shady_pages(self):
|
def test_no_shady_pages(self):
|
||||||
search = download_center.Search(
|
search = download_center.Download(
|
||||||
"Hello World",
|
exclude_shady=True
|
||||||
exclude_shady=True,
|
|
||||||
dry=True
|
|
||||||
)
|
)
|
||||||
|
|
||||||
for page in search.pages:
|
for page in search.pages:
|
||||||
self.assertNotIn(page, page_attributes.SHADY_PAGES)
|
self.assertNotIn(page, page_attributes.SHADY_PAGES)
|
||||||
|
|
||||||
def test_excluding(self):
|
def test_excluding(self):
|
||||||
search = download_center.Search(
|
search = download_center.Download(
|
||||||
"Hello World",
|
exclude_pages=set((pages.EncyclopaediaMetallum,))
|
||||||
exclude_pages=set((pages.EncyclopaediaMetallum,)),
|
|
||||||
dry=True
|
|
||||||
)
|
)
|
||||||
|
|
||||||
for page in search.pages:
|
for page in search.pages:
|
||||||
@ -31,20 +27,15 @@ class TestPageSelection(unittest.TestCase):
|
|||||||
|
|
||||||
|
|
||||||
def test_audio_one(self):
|
def test_audio_one(self):
|
||||||
search = download_center.Search(
|
search = download_center.Download(
|
||||||
"Hello World",
|
exclude_shady=True
|
||||||
exclude_shady=True,
|
|
||||||
dry=True
|
|
||||||
)
|
)
|
||||||
|
|
||||||
for audio_page in search.audio_pages:
|
for audio_page in search.audio_pages:
|
||||||
self.assertIn(audio_page, page_attributes.AUDIO_PAGES)
|
self.assertIn(audio_page, page_attributes.AUDIO_PAGES)
|
||||||
|
|
||||||
def test_audio_two(self):
|
def test_audio_two(self):
|
||||||
search = download_center.Search(
|
search = download_center.Download()
|
||||||
"Hello World",
|
|
||||||
dry=True
|
|
||||||
)
|
|
||||||
|
|
||||||
for audio_page in search.audio_pages:
|
for audio_page in search.audio_pages:
|
||||||
self.assertIn(audio_page, page_attributes.AUDIO_PAGES)
|
self.assertIn(audio_page, page_attributes.AUDIO_PAGES)
|
||||||
|
Loading…
Reference in New Issue
Block a user