mirror of
https://github.com/KevinMidboe/spotify-downloader.git
synced 2025-10-29 18:00:15 +00:00
Authenticating services
This commit is contained in:
16
spotdl/authorize/tests/test_authorize_base.py
Normal file
16
spotdl/authorize/tests/test_authorize_base.py
Normal file
@@ -0,0 +1,16 @@
|
||||
from spotdl.authorize import AuthorizeBase
|
||||
|
||||
import pytest
|
||||
|
||||
class TestAbstractBaseClass:
|
||||
def test_error_abstract_base_class_authorizebase(self):
|
||||
with pytest.raises(TypeError):
|
||||
AuthorizeBase()
|
||||
|
||||
def test_inherit_abstract_base_class_authorizebase(self):
|
||||
class AuthorizeKid(AuthorizeBase):
|
||||
def authorize(self):
|
||||
pass
|
||||
|
||||
AuthorizeKid()
|
||||
|
||||
15
spotdl/authorize/tests/test_authorize_exceptions.py
Normal file
15
spotdl/authorize/tests/test_authorize_exceptions.py
Normal file
@@ -0,0 +1,15 @@
|
||||
from spotdl.authorize.exceptions import AuthorizationError
|
||||
from spotdl.authorize.exceptions import SpotifyAuthorizationError
|
||||
from spotdl.authorize.exceptions import YouTubeAuthorizationError
|
||||
|
||||
|
||||
class TestEncoderNotFoundSubclass:
|
||||
def test_authozation_error_subclass(self):
|
||||
assert issubclass(AuthorizationError, Exception)
|
||||
|
||||
def test_spotify_authorization_error_subclass(self):
|
||||
assert issubclass(SpotifyAuthorizationError, AuthorizationError)
|
||||
|
||||
def test_youtube_authorization_error_subclass(self):
|
||||
assert issubclass(YouTubeAuthorizationError, AuthorizationError)
|
||||
|
||||
Reference in New Issue
Block a user