1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

python/tests: Lock in key-word arguments as key-word only in samba.tests.gssapi

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
This commit is contained in:
Andrew Bartlett 2023-11-20 12:42:15 +13:00
parent 61b0397de2
commit ebdb1f6b43

View File

@ -47,7 +47,7 @@ class GensecTests(samba.tests.TestCase):
def test_info_uninitialized(self):
self.assertRaises(RuntimeError, self.gensec.session_info)
def _test_update(self, mech, client_mech=None, client_only_opt=None):
def _test_update(self, mech, *, client_mech=None, client_only_opt=None):
"""Test GENSEC by doing an exchange with ourselves using GSSAPI against a KDC"""
# Start up a client and server GENSEC instance to test things with
@ -138,10 +138,10 @@ class GensecTests(samba.tests.TestCase):
self._test_update("GSS-SPNEGO")
def test_update_spnego_downgrade(self):
self._test_update("GSS-SPNEGO", "spnego", "gensec:gssapi_krb5")
self._test_update("GSS-SPNEGO", client_mech="spnego", client_only_opt="gensec:gssapi_krb5")
def test_update_no_optimistic_spnego(self):
self._test_update("GSS-SPNEGO", "spnego", "spnego:client_no_optimistic")
self._test_update("GSS-SPNEGO", client_mech="spnego", client_only_opt="spnego:client_no_optimistic")
def test_update_w2k_spnego_client(self):
self.lp_ctx.set("spnego:simulate_w2k", "yes")
@ -172,10 +172,10 @@ class GensecTests(samba.tests.TestCase):
self._test_update("GSS-SPNEGO")
def test_update_gss_krb5_to_spnego(self):
self._test_update("GSS-SPNEGO", "gssapi_krb5")
self._test_update("GSS-SPNEGO", client_mech="gssapi_krb5")
def test_update_ntlmssp_to_spnego(self):
self._test_update("GSS-SPNEGO", "ntlmssp")
self._test_update("GSS-SPNEGO", client_mech="ntlmssp")
def test_max_update_size(self):
"""Test GENSEC by doing an exchange with ourselves using GSSAPI against a KDC"""