combox

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

commit 94596f0913cfdc33ffc85aac1005ea745d6559f8
parent c06cab129456459886f0b49c3e0f303e647e2350
Author: Siddharth Ravikumar <sravik@bgsu.edu>
Date:   Tue, 20 Jan 2015 23:09:32 -0500

tests/events_test.py: fixed the path_deletedp function.

Diffstat:
tests/events_test.py | 9++++-----
1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/tests/events_test.py b/tests/events_test.py @@ -94,18 +94,17 @@ def renamedp(old_p, new_p): assert path.exists(new_path) -def path_deletedp(p): +def path_deletedp(p, is_dir=False): """ Checks if the directory or respective file shards is deleted under node directories. p: path to the directory or file, under the combox directory, that was deleted. + is_dir: set to True if `p' denotes a deleted directory. Default value is False. """ nodes = get_nodedirs(config) - is_dir = True if path.isdir(p) else False i = 0 - for node in nodes: rel_path = relative_path(p, config) @@ -176,8 +175,8 @@ def test_CEH(): os.rmdir(TEST_DIR_0) time.sleep(2) path_deletedp(TEST_FILE_COPY_1) - path_deletedp(TEST_DIR_1) - path_deletedp(TEST_DIR_0) + path_deletedp(TEST_DIR_1, True) + path_deletedp(TEST_DIR_0, True) observer.stop() observer.join()