summaryrefslogtreecommitdiff
path: root/testenv/tests/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'testenv/tests/plugins')
-rw-r--r--testenv/tests/plugins/auth/test_http.py3
-rw-r--r--testenv/tests/plugins/auth/test_pam.py8
2 files changed, 4 insertions, 7 deletions
diff --git a/testenv/tests/plugins/auth/test_http.py b/testenv/tests/plugins/auth/test_http.py
index 7a13f9b7..a02df543 100644
--- a/testenv/tests/plugins/auth/test_http.py
+++ b/testenv/tests/plugins/auth/test_http.py
@@ -20,7 +20,6 @@
# ========================================================================== #
-from typing import Dict
from typing import AsyncGenerator
import aiohttp.web
@@ -68,7 +67,7 @@ async def _auth_server_port_fixture(aiohttp_server) -> AsyncGenerator[int, None]
{"verify": False},
{"user": "server-admin", "passwd": "server-pass"},
])
-async def test_ok(auth_server_port: int, kwargs: Dict) -> None:
+async def test_ok(auth_server_port: int, kwargs: dict) -> None:
url = "http://localhost:%d/%s" % (
auth_server_port,
("auth_plus_basic" if kwargs.get("user") else "auth"),
diff --git a/testenv/tests/plugins/auth/test_pam.py b/testenv/tests/plugins/auth/test_pam.py
index ea524cb4..d165365b 100644
--- a/testenv/tests/plugins/auth/test_pam.py
+++ b/testenv/tests/plugins/auth/test_pam.py
@@ -24,9 +24,7 @@ import os
import asyncio
import pwd
-from typing import Dict
from typing import AsyncGenerator
-from typing import Optional
import pytest
import pytest_asyncio
@@ -41,7 +39,7 @@ _PASSWD = "query"
# =====
-async def _run_process(cmd: str, input: Optional[str]=None) -> None: # pylint: disable=redefined-builtin
+async def _run_process(cmd: str, input: (str | None)=None) -> None: # pylint: disable=redefined-builtin
proc = await asyncio.create_subprocess_exec(
*cmd.split(" "),
stdin=(asyncio.subprocess.PIPE if input is not None else None),
@@ -75,7 +73,7 @@ async def _test_user() -> AsyncGenerator[None, None]:
{"allow_users": [_USER]},
{"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:
assert not (await service.authorize(_USER, "invalid_password"))
@@ -88,7 +86,7 @@ async def test_ok(test_user, kwargs: Dict) -> None: # type: ignore
{"deny_users": [_USER]},
{"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:
assert not (await service.authorize(_USER, "invalid_password"))