Best Python code snippet using localstack_python
test_kms.py
Source:test_kms.py
...55 grants_before = kms_client.list_grants(KeyId=key_id)["Grants"]56 kms_client.retire_grant(GrantToken=grant["GrantToken"])57 grants_after = kms_client.list_grants(KeyId=key_id)["Grants"]58 assert len(grants_after) == len(grants_before) - 159 def test_asymmetric_keys(self, kms_client, kms_key):60 key_id = kms_key["KeyMetadata"]["KeyId"]61 # generate key pair without plaintext62 result = kms_client.generate_data_key_pair_without_plaintext(63 KeyId=key_id, KeyPairSpec="RSA_2048"64 )65 assert result.get("PrivateKeyCiphertextBlob")66 assert not result.get("PrivateKeyPlaintext")67 assert result.get("PublicKey")68 # generate key pair69 result = kms_client.generate_data_key_pair(KeyId=key_id, KeyPairSpec="RSA_2048")70 assert result.get("PrivateKeyCiphertextBlob")71 assert result.get("PrivateKeyPlaintext")72 assert result.get("PublicKey")73 # get public key...
Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!