PYTHON-5198 Fix test_03_invalid_keyid (#2195)

(cherry picked from commit 189923f7c3)
This commit is contained in:
Shane Harvey 2025-03-12 15:19:40 -07:00 committed by mongodb-dbx-release-bot[bot]
parent dc73514cba
commit b7236ed1fc
2 changed files with 4 additions and 2 deletions

View File

@ -2982,9 +2982,10 @@ class TestAutomaticDecryptionKeys(AsyncEncryptionIntegrationTest):
)
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,

View File

@ -2964,9 +2964,10 @@ class TestAutomaticDecryptionKeys(EncryptionIntegrationTest):
)
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,