Skip to content

Commit cb852dd

Browse files
committed
fixup
1 parent c73a87a commit cb852dd

File tree

2 files changed

+16
-14
lines changed

2 files changed

+16
-14
lines changed

test/asynchronous/test_auth.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -274,32 +274,33 @@ async def test_gssapi_threaded(self):
274274

275275
async def test_gssapi_canonicalize_host_name(self):
276276
# Use the equivalent named CANONICALIZE_HOST_NAME.
277-
if self.mech_properties["CANONICALIZE_HOST_NAME"] == "true":
278-
self.mech_properties["CANONICALIZE_HOST_NAME"] = "forwardAndReverse"
277+
props = self.mech_properties.copy()
278+
if props["CANONICALIZE_HOST_NAME"] == "true":
279+
props["CANONICALIZE_HOST_NAME"] = "forwardAndReverse"
279280
else:
280-
self.mech_properties["CANONICALIZE_HOST_NAME"] = "none"
281+
props["CANONICALIZE_HOST_NAME"] = "none"
281282
client = self.simple_client(
282283
GSSAPI_HOST,
283284
GSSAPI_PORT,
284285
username=GSSAPI_PRINCIPAL,
285286
password=GSSAPI_PASS,
286287
authMechanism="GSSAPI",
287-
authMechanismProperties=self.mech_properties,
288+
authMechanismProperties=props,
288289
)
289290
await client.server_info()
290291

291-
if self.mech_properties["CANONICALIZE_HOST_NAME"] == "none":
292+
if props["CANONICALIZE_HOST_NAME"] == "none":
292293
return
293294

294295
# Test with "forward".
295-
self.mech_properties["CANONICALIZE_HOST_NAME"] = "forward"
296+
props["CANONICALIZE_HOST_NAME"] = "forward"
296297
client = self.simple_client(
297298
GSSAPI_HOST,
298299
GSSAPI_PORT,
299300
username=GSSAPI_PRINCIPAL,
300301
password=GSSAPI_PASS,
301302
authMechanism="GSSAPI",
302-
authMechanismProperties=self.mech_properties,
303+
authMechanismProperties=props,
303304
)
304305
await client.server_info()
305306

test/test_auth.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -274,32 +274,33 @@ def test_gssapi_threaded(self):
274274

275275
def test_gssapi_canonicalize_host_name(self):
276276
# Use the equivalent named CANONICALIZE_HOST_NAME.
277-
if self.mech_properties["CANONICALIZE_HOST_NAME"] == "true":
278-
self.mech_properties["CANONICALIZE_HOST_NAME"] = "forwardAndReverse"
277+
props = self.mech_properties.copy()
278+
if props["CANONICALIZE_HOST_NAME"] == "true":
279+
props["CANONICALIZE_HOST_NAME"] = "forwardAndReverse"
279280
else:
280-
self.mech_properties["CANONICALIZE_HOST_NAME"] = "none"
281+
props["CANONICALIZE_HOST_NAME"] = "none"
281282
client = self.simple_client(
282283
GSSAPI_HOST,
283284
GSSAPI_PORT,
284285
username=GSSAPI_PRINCIPAL,
285286
password=GSSAPI_PASS,
286287
authMechanism="GSSAPI",
287-
authMechanismProperties=self.mech_properties,
288+
authMechanismProperties=props,
288289
)
289290
client.server_info()
290291

291-
if self.mech_properties["CANONICALIZE_HOST_NAME"] == "none":
292+
if props["CANONICALIZE_HOST_NAME"] == "none":
292293
return
293294

294295
# Test with "forward".
295-
self.mech_properties["CANONICALIZE_HOST_NAME"] = "forward"
296+
props["CANONICALIZE_HOST_NAME"] = "forward"
296297
client = self.simple_client(
297298
GSSAPI_HOST,
298299
GSSAPI_PORT,
299300
username=GSSAPI_PRINCIPAL,
300301
password=GSSAPI_PASS,
301302
authMechanism="GSSAPI",
302-
authMechanismProperties=self.mech_properties,
303+
authMechanismProperties=props,
303304
)
304305
client.server_info()
305306

0 commit comments

Comments
 (0)