combox

split and encrypted files between online file storage providers
git clone git://git.ricketyspace.net/combox.git
Log | Files | Refs

commit 5729f1b0b3fd1f04f9f6e1787df3dbb74964a404
parent dddb7f8a622ecb80da38291e056f66a973cb5148
Author: Siddharth Ravikumar <sravik@bgsu.edu>
Date:   Wed,  8 Apr 2015 16:20:25 -0400

Added test for directory creation in tests.events_test.TestEvents.test_NDM_oncreated.

   modified:   tests/events_test.py

Diffstat:
tests/events_test.py | 30+++++++++++++++---------------
1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/tests/events_test.py b/tests/events_test.py @@ -275,6 +275,21 @@ class TestEvents(object): ## check if the new file's info is in silo assert self.silo.exists(self.TEST_FILE_MUTANT) + # Test - directory creation + self.FOO_DIR = path.join(self.FILES_DIR, 'foo') + mk_nodedir(self.FOO_DIR, self.config) + time.sleep(1) + ## check if FOO_DIR is created under the combox directory + assert path.isdir(self.FOO_DIR) + + self.BAR_DIR = path.join(self.FOO_DIR, 'bar') + mk_nodedir(self.BAR_DIR, self.config) + time.sleep(1) + ## check if BAR_DIR is created under the combox directory. + assert path.isdir(self.BAR_DIR) + + self.purge_list.append(self.FOO_DIR) + for i in range(num_nodes): observers[i].stop() observers[i].join() @@ -308,21 +323,6 @@ class TestEvents(object): assert silo.exists(self.TEST_FILE_MUTANT) #### - # Test - directory creation - self.FOO_DIR = path.join(self.FILES_DIR, 'foo') - mk_nodedir(self.FOO_DIR, self.config) - time.sleep(1) - ## check if FOO_DIR is created under the combox directory - assert path.isdir(self.FOO_DIR) - - self.BAR_DIR = path.join(self.FOO_DIR, 'bar') - mk_nodedir(self.BAR_DIR, self.config) - time.sleep(1) - ## check if BAR_DIR is created under the combox directory. - assert path.isdir(self.BAR_DIR) - - self.purge_list.append(self.FOO_DIR) - # Test - Shard deletion. rm_shards(self.TEST_FILE_MUTANT, self.config) time.sleep(1)