From b7236ed1fc6cfa5a782bf9d76432780cfd138bd1 Mon Sep 17 00:00:00 2001 From: Shane Harvey Date: Wed, 12 Mar 2025 15:19:40 -0700 Subject: [PATCH] PYTHON-5198 Fix test_03_invalid_keyid (#2195) (cherry picked from commit 189923f7c3821965ad92b65b1b137f171f9e4842) --- test/asynchronous/test_encryption.py | 3 ++- test/test_encryption.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/test/asynchronous/test_encryption.py b/test/asynchronous/test_encryption.py index 2b22bd8b76..776eaf0d36 100644 --- a/test/asynchronous/test_encryption.py +++ b/test/asynchronous/test_encryption.py @@ -2982,9 +2982,10 @@ async def test_02_no_fields(self): ) async def test_03_invalid_keyid(self): + # checkAuthForCreateCollection can be removed when SERVER-102101 is fixed. with self.assertRaisesRegex( EncryptedCollectionError, - "create.encryptedFields.fields.keyId' is the wrong type 'bool', expected type 'binData", + "(create|checkAuthForCreateCollection).encryptedFields.fields.keyId' is the wrong type 'bool', expected type 'binData", ): await self.client_encryption.create_encrypted_collection( database=self.db, diff --git a/test/test_encryption.py b/test/test_encryption.py index 9224310144..e1424686b1 100644 --- a/test/test_encryption.py +++ b/test/test_encryption.py @@ -2964,9 +2964,10 @@ def test_02_no_fields(self): ) def test_03_invalid_keyid(self): + # checkAuthForCreateCollection can be removed when SERVER-102101 is fixed. with self.assertRaisesRegex( EncryptedCollectionError, - "create.encryptedFields.fields.keyId' is the wrong type 'bool', expected type 'binData", + "(create|checkAuthForCreateCollection).encryptedFields.fields.keyId' is the wrong type 'bool', expected type 'binData", ): self.client_encryption.create_encrypted_collection( database=self.db,