Validate kwargs in constructor.
(self)
| 593 | self.assertIsInstance(c.options.retry_reads, bool) |
| 594 | |
| 595 | def test_validate_suggestion(self): |
| 596 | """Validate kwargs in constructor.""" |
| 597 | for typo in ["auth", "Auth", "AUTH"]: |
| 598 | expected = f"Unknown option: {typo}. Did you mean one of (authsource, authmechanism, authoidcallowedhosts) or maybe a camelCase version of one? Refer to docstring." |
| 599 | expected = re.escape(expected) |
| 600 | with self.assertRaisesRegex(ConfigurationError, expected): |
| 601 | MongoClient(**{typo: "standard"}) # type: ignore[arg-type] |
| 602 | |
| 603 | @patch("pymongo.synchronous.srv_resolver._SrvResolver.get_hosts") |
| 604 | def test_detected_environment_logging(self, mock_get_hosts): |
nothing calls this directly
no test coverage detected