def test_bad_encryption_keys(self, quiet_logger): processor = EYAMLProcessor(quiet_logger, None) processor.privatekey = "/no/such/file" processor.publickey = "/no/such/file" with pytest.raises(EYAMLCommandException): processor.encrypt_eyaml("test")
def test_encrypt_calledprocesserror(self, quiet_logger, force_subprocess_run_cpe): processor = EYAMLProcessor(quiet_logger, None) with pytest.raises(EYAMLCommandException): processor.encrypt_eyaml("any value")
def test_ignore_already_encrypted_cryps(self, quiet_logger): processor = EYAMLProcessor(quiet_logger, None) testval = "ENC[...]" assert testval == processor.encrypt_eyaml(testval)
def test_no_encrypt_without_eyaml(self, quiet_logger): processor = EYAMLProcessor(quiet_logger, None) processor.eyaml = None with pytest.raises(EYAMLCommandException): processor.encrypt_eyaml("test")