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