mirror of
https://github.com/arcan1s/ahriman.git
synced 2025-08-31 22:09:56 +00:00
replace several store_true keys to booleanoptionalaction alternative (#74)
This commit is contained in:
@ -4,7 +4,7 @@ import pytest
|
||||
from pytest_mock import MockerFixture
|
||||
|
||||
from ahriman.core.auth import OAuth
|
||||
from ahriman.core.exceptions import InvalidOption
|
||||
from ahriman.core.exceptions import OptionError
|
||||
|
||||
|
||||
def test_auth_control(oauth: OAuth) -> None:
|
||||
@ -28,7 +28,7 @@ def test_get_provider_not_a_type() -> None:
|
||||
"""
|
||||
must raise an exception if attribute is not a type
|
||||
"""
|
||||
with pytest.raises(InvalidOption):
|
||||
with pytest.raises(OptionError):
|
||||
OAuth.get_provider("__version__")
|
||||
|
||||
|
||||
@ -36,9 +36,9 @@ def test_get_provider_invalid_type() -> None:
|
||||
"""
|
||||
must raise an exception if attribute is not an OAuth2 client
|
||||
"""
|
||||
with pytest.raises(InvalidOption):
|
||||
with pytest.raises(OptionError):
|
||||
OAuth.get_provider("User")
|
||||
with pytest.raises(InvalidOption):
|
||||
with pytest.raises(OptionError):
|
||||
OAuth.get_provider("OAuth1Client")
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user