Simplify scrapper test
This commit is contained in:
@ -1,16 +1,7 @@
|
||||
from vrobbler.apps.podcasts.scrapers import scrape_data_from_google_podcasts
|
||||
|
||||
expected_desc = (
|
||||
expected_desc_snippet = (
|
||||
"NPR's Up First is the news you need to start your day. "
|
||||
"The three biggest stories of the day, with reporting and analysis "
|
||||
"from NPR News — in 10 minutes. Available weekdays by 6 a.m. ET, "
|
||||
"with hosts Leila Fadel, Steve Inskeep, Michel Martin and A Martinez. "
|
||||
"Also available on Saturdays by 8 a.m. ET, with Ayesha Rascoe and "
|
||||
"Scott Simon. On Sundays, hear a longer exploration behind the "
|
||||
"headlines with Rachel Martin, available by 8 a.m. ET. Subscribe "
|
||||
"and listen, then support your local NPR station at donate.npr.org. "
|
||||
"Support NPR's reporting by subscribing to Up First+ and unlock "
|
||||
"sponsor-free listening. Learn more at plus.npr.org/upfirst"
|
||||
)
|
||||
|
||||
expected_img_url = "https://encrypted-tbn2.gstatic.com/images?q=tbn:ANd9GcR1F0CfR24RR6sme531yIkCrnK4zzmo97jeualO5drVPKG6oCk"
|
||||
@ -22,7 +13,7 @@ def test_get_not_allowed_from_mopidy():
|
||||
result_dict = scrape_data_from_google_podcasts(query)
|
||||
|
||||
assert result_dict["title"] == query
|
||||
assert result_dict["description"] == expected_desc
|
||||
assert expected_desc_snippet in result_dict["description"]
|
||||
assert result_dict["image_url"] == expected_img_url
|
||||
assert result_dict["producer"] == "NPR"
|
||||
assert result_dict["google_url"] == expected_google_url
|
||||
|
||||
Reference in New Issue
Block a user