Exemplo n.º 1
0
    def test_happy_path(self):
        os.environ['CLRYPT_CERT'] = CERT_FILE
        os.environ['CLRYPT_PK'] = PK_FILE
        os.environ['ENCRYPTED_DIR'] = EXPECTED_ENC_DIR

        decrypted = clrypt.read_file("testing", "content", ext="yml")
        self.assertEqual(decrypted, b"test content")
Exemplo n.º 2
0
    def test_happy_path(self):
        os.environ['CLRYPT_CERT'] = CERT_FILE
        os.environ['CLRYPT_PK'] = PK_FILE
        os.environ['ENCRYPTED_DIR'] = EXPECTED_ENC_DIR

        decrypted = clrypt.read_file("testing", "content", ext="yml")
        self.assertEqual(decrypted, "test content")
Exemplo n.º 3
0
    def test_happy_path_find_encrypted_dir(self):
        os.environ['CLRYPT_CERT'] = CERT_FILE
        os.environ['CLRYPT_PK'] = PK_FILE
        os.environ.pop('ENCRYPTED_DIR', None)
        os.chdir(TEST_DIR)

        decrypted = clrypt.read_file("testing", "content", ext="yml")
        self.assertEqual(decrypted, b"test content")
Exemplo n.º 4
0
    def test_happy_path_find_encrypted_dir(self):
        os.environ['CLRYPT_CERT'] = CERT_FILE
        os.environ['CLRYPT_PK'] = PK_FILE
        os.environ.pop('ENCRYPTED_DIR', None)
        os.chdir(TEST_DIR)

        decrypted = clrypt.read_file("testing", "content", ext="yml")
        self.assertEqual(decrypted, "test content")