summaryrefslogtreecommitdiff
path: root/testenv
diff options
context:
space:
mode:
authorMaxim Devaev <[email protected]>2023-01-22 18:11:26 +0200
committerMaxim Devaev <[email protected]>2023-01-22 19:35:45 +0200
commit828778f10afb5d9e3824c72ba559e448e158b4ce (patch)
tree27e5aaa0f26b9486a5aee475aef5ca78bcc8256b /testenv
parent2cbdd9984a51854930885967b8eddb78b58783b6 (diff)
refactoring
Diffstat (limited to 'testenv')
-rw-r--r--testenv/tests/apps/kvmd/test_auth.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/testenv/tests/apps/kvmd/test_auth.py b/testenv/tests/apps/kvmd/test_auth.py
index 4a9b8766..8b8577bd 100644
--- a/testenv/tests/apps/kvmd/test_auth.py
+++ b/testenv/tests/apps/kvmd/test_auth.py
@@ -51,12 +51,14 @@ async def _get_configured_manager(
) -> AsyncGenerator[AuthManager, None]:
manager = AuthManager(
+ enabled=True,
+
internal_type="htpasswd",
internal_kwargs=_make_service_kwargs(internal_path),
+ force_internal_users=(force_internal_users or []),
+
external_type=("htpasswd" if external_path else ""),
external_kwargs=(_make_service_kwargs(external_path) if external_path else {}),
- force_internal_users=(force_internal_users or []),
- enabled=True,
)
try:
@@ -139,12 +141,14 @@ async def test_ok__external(tmpdir) -> None: # type: ignore
async def test_ok__disabled() -> None:
try:
manager = AuthManager(
+ enabled=False,
+
internal_type="foobar",
internal_kwargs={},
+ force_internal_users=[],
+
external_type="",
external_kwargs={},
- force_internal_users=[],
- enabled=False,
)
assert not manager.is_auth_enabled()