Skip to content

Commit 8f7372b

Browse files
committed
fix test
1 parent 9e22214 commit 8f7372b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pymongo/common.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -873,7 +873,9 @@ def get_setter_key(x: str) -> str:
873873
validator = _get_validator(opt, URI_OPTIONS_VALIDATOR_MAP, normed_key=normed_key)
874874
validated = validator(opt, value)
875875
except (ValueError, TypeError, ConfigurationError) as exc:
876-
if normed_key == "authmechanismproperties" and _MECH_PROP_MUST_RAISE in str(exc):
876+
if normed_key == "authmechanismproperties" and any(
877+
p in str(exc) for p in _MECH_PROP_MUST_RAISE
878+
):
877879
raise
878880
if warn:
879881
warnings.warn(str(exc), stacklevel=2)

0 commit comments

Comments
 (0)