Exemple #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")
Exemple #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")
Exemple #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")
Exemple #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")