MCPcopy Create free account
hub / github.com/mongodb/mongo-python-driver / test_gssapi_host_name

Method test_gssapi_host_name

test/test_auth.py:300–325  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

298 client.server_info()
299
300 def test_gssapi_host_name(self):
301 props = self.mech_properties
302 props["SERVICE_HOST"] = "example.com"
303
304 # Authenticate with authMechanismProperties.
305 client = self.simple_client(
306 GSSAPI_HOST,
307 GSSAPI_PORT,
308 username=GSSAPI_PRINCIPAL,
309 password=GSSAPI_PASS,
310 authMechanism="GSSAPI",
311 authMechanismProperties=self.mech_properties,
312 )
313 with self.assertRaises(OperationFailure):
314 client.server_info()
315
316 props["SERVICE_HOST"] = GSSAPI_HOST
317 client = self.simple_client(
318 GSSAPI_HOST,
319 GSSAPI_PORT,
320 username=GSSAPI_PRINCIPAL,
321 password=GSSAPI_PASS,
322 authMechanism="GSSAPI",
323 authMechanismProperties=self.mech_properties,
324 )
325 client.server_info()
326
327
328class TestSASLPlain(PyMongoTestCase):

Callers

nothing calls this directly

Calls 2

simple_clientMethod · 0.45
server_infoMethod · 0.45

Tested by

no test coverage detected