From 694240de5d0c803b866c1b633ac5b521f32ee111 Mon Sep 17 00:00:00 2001 From: Siddharth Ravikumar Date: Thu, 26 Feb 2015 02:20:09 -0500 Subject: updated tests.crypto_test.TestCrypto.test_convenience_crypto Added code to test the new arg `write' in the decrypt_and_glue function. --- tests/crypto_test.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/crypto_test.py b/tests/crypto_test.py index 8cff6f9..454255c 100644 --- a/tests/crypto_test.py +++ b/tests/crypto_test.py @@ -108,8 +108,12 @@ class TestCrypto(object): # reads encrypted shards from node directories, glues them and # writes decrypted back to combox directory. - decrypt_and_glue(self.TEST_FILE, self.config) + os.remove(self.TEST_FILE) + decrypt_and_glue(self.TEST_FILE, self.config, write=False) + assert not path.exists(self.TEST_FILE) + decrypt_and_glue(self.TEST_FILE, self.config) + assert path.exists(self.TEST_FILE) assert cmp(self.TEST_FILE, self.TEST_FILE_COPY, False) -- cgit v1.2.3