(self)
| 528 | client_encryption.encrypt("str", algo, key_id=Binary(b"123")) |
| 529 | |
| 530 | def test_bson_errors(self): |
| 531 | client_encryption = self.create_client_encryption( |
| 532 | KMS_PROVIDERS, "keyvault.datakeys", client_context.client, OPTS |
| 533 | ) |
| 534 | |
| 535 | # Attempt to encrypt an unencodable object. |
| 536 | unencodable_value = object() |
| 537 | with self.assertRaises(BSONError): |
| 538 | client_encryption.encrypt( |
| 539 | unencodable_value, |
| 540 | Algorithm.AEAD_AES_256_CBC_HMAC_SHA_512_Deterministic, |
| 541 | key_id=Binary.from_uuid(uuid.uuid4()), |
| 542 | ) |
| 543 | |
| 544 | def test_codec_options(self): |
| 545 | with self.assertRaisesRegex(TypeError, "codec_options must be"): |
nothing calls this directly
no test coverage detected