(self)
| 419 | ) |
| 420 | |
| 421 | def test_parse_ssl_paths(self): |
| 422 | # Turn off "validate" since these paths don't exist on filesystem. |
| 423 | self.assertEqual( |
| 424 | { |
| 425 | "collection": None, |
| 426 | "database": None, |
| 427 | "nodelist": [("/MongoDB.sock", None)], |
| 428 | "options": {"tlsCertificateKeyFile": "/a/b"}, |
| 429 | "password": "foo/bar", |
| 430 | "username": "jesse", |
| 431 | "fqdn": None, |
| 432 | }, |
| 433 | parse_uri( |
| 434 | "mongodb://jesse:foo%2Fbar@%2FMongoDB.sock/?tlsCertificateKeyFile=/a/b", |
| 435 | validate=False, |
| 436 | ), |
| 437 | ) |
| 438 | |
| 439 | self.assertEqual( |
| 440 | { |
| 441 | "collection": None, |
| 442 | "database": None, |
| 443 | "nodelist": [("/MongoDB.sock", None)], |
| 444 | "options": {"tlsCertificateKeyFile": "a/b"}, |
| 445 | "password": "foo/bar", |
| 446 | "username": "jesse", |
| 447 | "fqdn": None, |
| 448 | }, |
| 449 | parse_uri( |
| 450 | "mongodb://jesse:foo%2Fbar@%2FMongoDB.sock/?tlsCertificateKeyFile=a/b", |
| 451 | validate=False, |
| 452 | ), |
| 453 | ) |
| 454 | |
| 455 | def test_tlsinsecure_simple(self): |
| 456 | # check that tlsInsecure is expanded correctly. |
nothing calls this directly
no test coverage detected