fix tests

This commit is contained in:
sigma67 2024-02-22 20:02:59 +01:00 • committed by sigma67
commit f237d50ab7
9 changed files with 63 additions and 7 deletions

0
tests/mixins/__init__.py Normal file
View file

View file

@ -6,7 +6,7 @@ import pytest
class TestBrowsing:
def test_get_home(self, yt, yt_auth):
result = yt.get_home()
assert len(result) == 2
assert len(result) >= 2
result = yt_auth.get_home(limit=15)
assert len(result) >= 15

View file

@ -107,5 +107,5 @@ class TestLibrary:
assert "actions" in response
def test_subscribe_artists(self, yt_auth):
yt_auth.subscribe_artists(["UCUDVBtnOQi4c7E8jebpjc9Q", "UCiMhD4jzUqG-IgPzUmmytRQ"])
yt_auth.unsubscribe_artists(["UCUDVBtnOQi4c7E8jebpjc9Q", "UCiMhD4jzUqG-IgPzUmmytRQ"])
yt_auth.subscribe_artists(["UCUDVBtnOQi4c7E8jebpjc9Q"])
yt_auth.unsubscribe_artists(["UCUDVBtnOQi4c7E8jebpjc9Q"])

View file

@ -60,7 +60,7 @@ class TestSearch:
results = yt.search("fdsfsfsd") # issue 524
assert results[0]["category"] == "Top result"
assert results[0]["resultType"] == "playlist"
assert results[0]["playlistId"] == "PLK3q5XTYSK60QH3gDypSu3n9OBz6H9HfV"
assert results[0]["playlistId"].startswith("PL")
assert len(results[0]["author"]) > 0
def test_search_uploads(self, config, yt, yt_oauth):