MCPcopy Create free account
hub / github.com/saltstack/salt / test_get_groups

Function test_get_groups

tests/pytests/unit/test_auth.py:342–361  ·  view source on GitHub ↗
(load_auth)

Source from the content-addressed store, hash-verified

340
341
342def test_get_groups(load_auth):
343 valid_eauth_load = {
344 "username": "test_user",
345 "show_timeout": False,
346 "test_password": "",
347 "eauth": "pam",
348 }
349 with patch("salt.utils.args.format_call") as format_call_mock:
350 expected_ret = call(
351 "fake_groups_function_str",
352 {
353 "username": "test_user",
354 "test_password": "",
355 "show_timeout": False,
356 "eauth": "pam",
357 },
358 expected_extra_kws=salt.auth.AUTH_INTERNAL_KEYWORDS,
359 )
360 load_auth.get_groups(valid_eauth_load)
361 format_call_mock.assert_has_calls((expected_ret,), any_order=True)
362
363
364@pytest.mark.skip_on_windows(reason="PAM eauth not available on Windows")

Callers

nothing calls this directly

Calls 3

get_groupsMethod · 0.80
patchFunction · 0.50
callFunction · 0.50

Tested by

no test coverage detected