mirror of
https://github.com/arcan1s/ahriman.git
synced 2026-11-24 09:59:30 +00:00
test: fix tests for oauth client update
This commit is contained in:
1 parent
11787f740e
commit
941a51d496
1 file changed
+2
-1
@@ -31,10 +31,11 @@ def test_get_provider() -> None:
|
|||||||
assert OAuth.get_provider("GithubClient") == aioauth_client.GithubClient
|
assert OAuth.get_provider("GithubClient") == aioauth_client.GithubClient
|
||||||
|
|
||||||
|
|
||||||
def test_get_provider_not_a_type() -> None:
|
def test_get_provider_not_a_type(mocker: MockerFixture) -> None:
|
||||||
"""
|
"""
|
||||||
must raise an exception if attribute is not a type
|
must raise an exception if attribute is not a type
|
||||||
"""
|
"""
|
||||||
|
mocker.patch.object(aioauth_client, "RANDOM", "not a type", create=True)
|
||||||
with pytest.raises(OptionError):
|
with pytest.raises(OptionError):
|
||||||
OAuth.get_provider("RANDOM")
|
OAuth.get_provider("RANDOM")
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user