MCPcopy Index your code
hub / github.com/mongodb/mongo-python-driver / test_handle_colon

Method test_handle_colon

test/test_uri_parser.py:515–526  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

513 parse_uri(uri)
514
515 def test_handle_colon(self):
516 token = "token:foo"
517 uri = (
518 "mongodb://user:password@localhost/?authMechanism=MONGODB-AWS"
519 "&authMechanismProperties=AWS_SESSION_TOKEN:" + token
520 )
521 res = parse_uri(uri)
522 options = {
523 "authMechanism": "MONGODB-AWS",
524 "authMechanismProperties": {"AWS_SESSION_TOKEN": token},
525 }
526 self.assertEqual(options, res["options"])
527
528 def test_special_chars(self):
529 user = "user@ /9+:?~!$&'()*+,;="

Callers

nothing calls this directly

Calls 1

parse_uriFunction · 0.90

Tested by

no test coverage detected