replace several store_true keys to booleanoptionalaction alternative (#74)

This commit is contained in:
2022-11-10 18:34:01 +03:00
committed by GitHub
parent b3b3cad706
commit b75bd30658
120 changed files with 770 additions and 705 deletions

View File

@ -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")