Fix 721 (#725)
* update dev-dependencies * fix INP001 * fix #721 * add test * format
This commit is contained in:
parent
862f507e82
commit
e41e1a37d7
8 changed files with 284 additions and 277 deletions
|
|
@ -85,9 +85,9 @@ class TestUploads:
|
|||
# Now re-upload
|
||||
upload_response = yt_auth.upload_song(get_resource(config["uploads"]["file"]))
|
||||
|
||||
assert (
|
||||
upload_response == ResponseStatus.SUCCEEDED or upload_response.status_code == 200
|
||||
), f"Song failed to upload {upload_response}"
|
||||
assert upload_response == ResponseStatus.SUCCEEDED or upload_response.status_code == 200, (
|
||||
f"Song failed to upload {upload_response}"
|
||||
)
|
||||
|
||||
# Wait for upload to finish processing and verify it can be retrieved
|
||||
retries_remaining = 5
|
||||
|
|
|
|||
0
tests/setup/__init__.py
Normal file
0
tests/setup/__init__.py
Normal file
|
|
@ -1,6 +1,14 @@
|
|||
import pytest
|
||||
|
||||
from ytmusicapi import YTMusic
|
||||
from ytmusicapi.exceptions import YTMusicUserError
|
||||
|
||||
|
||||
def test_ytmusic_context():
|
||||
with YTMusic(requests_session=False) as yt:
|
||||
assert isinstance(yt, YTMusic)
|
||||
|
||||
|
||||
def test_ytmusic_auth_error():
|
||||
with pytest.raises(YTMusicUserError, match="Invalid auth"):
|
||||
YTMusic(auth="def")
|
||||
|
|
|
|||
Loading…
Reference in a new issue