mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2025-12-12 17:20:30 +08:00
lint fix
This commit is contained in:
parent
5b2eb6892f
commit
301e58148e
@ -75,6 +75,7 @@ async def _test_user() -> AsyncGenerator[None, None]:
|
|||||||
{"allow_uids_at": _UID},
|
{"allow_uids_at": _UID},
|
||||||
])
|
])
|
||||||
async def test_ok(test_user, kwargs: Dict) -> None: # type: ignore
|
async def test_ok(test_user, kwargs: Dict) -> None: # type: ignore
|
||||||
|
_ = test_user
|
||||||
async with get_configured_auth_service("pam", **kwargs) as service:
|
async with get_configured_auth_service("pam", **kwargs) as service:
|
||||||
assert not (await service.authorize(_USER, "invalid_password"))
|
assert not (await service.authorize(_USER, "invalid_password"))
|
||||||
assert (await service.authorize(_USER, _PASSWD))
|
assert (await service.authorize(_USER, _PASSWD))
|
||||||
@ -87,6 +88,7 @@ async def test_ok(test_user, kwargs: Dict) -> None: # type: ignore
|
|||||||
{"allow_uids_at": _UID + 1},
|
{"allow_uids_at": _UID + 1},
|
||||||
])
|
])
|
||||||
async def test_fail(test_user, kwargs: Dict) -> None: # type: ignore
|
async def test_fail(test_user, kwargs: Dict) -> None: # type: ignore
|
||||||
|
_ = test_user
|
||||||
async with get_configured_auth_service("pam", **kwargs) as service:
|
async with get_configured_auth_service("pam", **kwargs) as service:
|
||||||
assert not (await service.authorize(_USER, "invalid_password"))
|
assert not (await service.authorize(_USER, "invalid_password"))
|
||||||
assert not (await service.authorize(_USER, _PASSWD))
|
assert not (await service.authorize(_USER, _PASSWD))
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user