Skip to content

Commit 7006b8d

Browse files
committed
Test fixes
1 parent 3a109ab commit 7006b8d

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

test/asynchronous/test_auth_oidc.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -887,6 +887,7 @@ async def test_2_6_ALLOWED_HOSTS_defaults_ignored(self):
887887
async def test_3_1_authentication_failure_with_cached_tokens_fetch_a_new_token_and_retry(self):
888888
# Create a AsyncMongoClient and an OIDC callback that implements the provider logic.
889889
client = await self.create_client()
890+
await client.aconnect()
890891
# Poison the cache with an invalid access token.
891892
# Set a fail point for ``find`` command.
892893
async with self.fail_point(
@@ -953,6 +954,7 @@ async def test_4_1_reauthentication_succeeds(self):
953954
# Create a ``AsyncMongoClient`` configured with a custom OIDC callback that
954955
# implements the provider logic.
955956
client = await self.create_client()
957+
await client.aconnect()
956958

957959
# Set a fail point for the find command.
958960
async with self.fail_point(

test/test_auth_oidc.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -885,6 +885,7 @@ def test_2_6_ALLOWED_HOSTS_defaults_ignored(self):
885885
def test_3_1_authentication_failure_with_cached_tokens_fetch_a_new_token_and_retry(self):
886886
# Create a MongoClient and an OIDC callback that implements the provider logic.
887887
client = self.create_client()
888+
client._connect()
888889
# Poison the cache with an invalid access token.
889890
# Set a fail point for ``find`` command.
890891
with self.fail_point(
@@ -951,6 +952,7 @@ def test_4_1_reauthentication_succeeds(self):
951952
# Create a ``MongoClient`` configured with a custom OIDC callback that
952953
# implements the provider logic.
953954
client = self.create_client()
955+
client._connect()
954956

955957
# Set a fail point for the find command.
956958
with self.fail_point(

0 commit comments

Comments
 (0)