Skip to content

Commit ea074a3

Browse files
authored
PYTHON-5894 fix failing auth spec tests (mongodb#2888)
1 parent 08d64aa commit ea074a3

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

test/asynchronous/test_auth_spec.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,9 @@ def run_test(self):
5858
if not valid:
5959
with warnings.catch_warnings():
6060
warnings.simplefilter("default")
61-
self.assertRaises(ConfigurationError, AsyncMongoClient, uri, connect=False)
61+
self.assertRaises(
62+
(ConfigurationError, ValueError), AsyncMongoClient, uri, connect=False
63+
)
6264
else:
6365
client = self.simple_client(uri, connect=False)
6466
credentials = client.options.pool_options._credentials

test/test_auth_spec.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def run_test(self):
5858
if not valid:
5959
with warnings.catch_warnings():
6060
warnings.simplefilter("default")
61-
self.assertRaises(ConfigurationError, MongoClient, uri, connect=False)
61+
self.assertRaises((ConfigurationError, ValueError), MongoClient, uri, connect=False)
6262
else:
6363
client = self.simple_client(uri, connect=False)
6464
credentials = client.options.pool_options._credentials

0 commit comments

Comments
 (0)