(self)
| 858 | return {"local": {"key": LOCAL_MASTER_KEY}} |
| 859 | |
| 860 | def test_views_are_prohibited(self): |
| 861 | self.client.db.view.drop() |
| 862 | self.client.db.create_collection("view", viewOn="coll") |
| 863 | self.addCleanup(self.client.db.view.drop) |
| 864 | |
| 865 | opts = AutoEncryptionOpts(self.kms_providers(), "keyvault.datakeys") |
| 866 | client_encrypted = self.rs_or_single_client( |
| 867 | auto_encryption_opts=opts, uuidRepresentation="standard" |
| 868 | ) |
| 869 | |
| 870 | with self.assertRaisesRegex(EncryptionError, "cannot auto encrypt a view"): |
| 871 | client_encrypted.db.view.insert_one({}) |
| 872 | |
| 873 | |
| 874 | class TestCorpus(EncryptionIntegrationTest): |
nothing calls this directly
no test coverage detected