Exemplo n.º 1
0
    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")
Exemplo n.º 2
0
 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")
Exemplo n.º 3
0
 def test_ignore_already_encrypted_cryps(self, quiet_logger):
     processor = EYAMLProcessor(quiet_logger, None)
     testval = "ENC[...]"
     assert testval == processor.encrypt_eyaml(testval)
Exemplo n.º 4
0
 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")