diff options
author | Siddharth Ravikumar <sravik@bgsu.edu> | 2015-01-21 10:02:17 -0500 |
---|---|---|
committer | Siddharth Ravikumar <sravik@bgsu.edu> | 2015-01-21 10:02:17 -0500 |
commit | a41fc635967f3fbdcdd9acaa6268323e7accb1a5 (patch) | |
tree | 476395d73b29be8e19f07e371836a5094436473d | |
parent | 4c11dad2be14dea97b449cfe48643942b1fff619 (diff) |
Renamed ComboxEventHandler (class) -> ComboxDirMonitor
modified: combox/events.py
modified: tests/events_test.py
-rw-r--r-- | combox/events.py | 10 | ||||
-rw-r--r-- | tests/events_test.py | 8 |
2 files changed, 9 insertions, 9 deletions
diff --git a/combox/events.py b/combox/events.py index e2ebb57..782ab75 100644 --- a/combox/events.py +++ b/combox/events.py @@ -28,7 +28,7 @@ from combox.file import (mk_nodedir, rm_nodedir, rm_shards, relative_path, move_shards, move_nodedir) -class ComboxEventHandler(FileSystemEventHandler): +class ComboxDirMonitor(FileSystemEventHandler): """Monitors Combox directory for changes and does its crypto thing. """ @@ -45,7 +45,7 @@ class ComboxEventHandler(FileSystemEventHandler): def on_moved(self, event): - super(ComboxEventHandler, self).on_moved(event) + super(ComboxDirMonitor, self).on_moved(event) if event.is_directory: # creates a corresponding directory at the node dirs. @@ -63,7 +63,7 @@ class ComboxEventHandler(FileSystemEventHandler): def on_created(self, event): - super(ComboxEventHandler, self).on_created(event) + super(ComboxDirMonitor, self).on_created(event) if event.is_directory: # creates a corresponding directory at the node dirs. @@ -78,7 +78,7 @@ class ComboxEventHandler(FileSystemEventHandler): def on_deleted(self, event): - super(ComboxEventHandler, self).on_deleted(event) + super(ComboxDirMonitor, self).on_deleted(event) if event.is_directory: # Delete corresponding directory in the nodes. @@ -94,7 +94,7 @@ class ComboxEventHandler(FileSystemEventHandler): def on_modified(self, event): - super(ComboxEventHandler, self).on_modified(event) + super(ComboxDirMonitor, self).on_modified(event) if event.is_directory: # do nothing diff --git a/tests/events_test.py b/tests/events_test.py index c53ce1d..26a846d 100644 --- a/tests/events_test.py +++ b/tests/events_test.py @@ -27,7 +27,7 @@ from os import path, remove from shutil import copyfile from watchdog.observers import Observer -from combox.events import ComboxEventHandler +from combox.events import ComboxDirMonitor from combox.config import get_nodedirs from combox.crypto import decrypt_and_glue from combox.file import (relative_path, purge_dir, @@ -121,10 +121,10 @@ def path_deletedp(p, is_dir=False): def test_CEH(): """ - Tests the ComboxEventHandler class. + Tests the ComboxDirMonitor class. """ - event_handler = ComboxEventHandler(config) + event_handler = ComboxDirMonitor(config) observer = Observer() observer.schedule(event_handler, FILES_DIR, recursive=True) observer.start() @@ -132,7 +132,7 @@ def test_CEH(): # Test - new file addition TEST_FILE_COPY_0 = "%s.mutant" % TEST_FILE copyfile(TEST_FILE, TEST_FILE_COPY_0) - ## wait for ComboxEventHandler to split and scatter the file in the + ## wait for ComboxDirMonitor to split and scatter the file in the ## node directories. time.sleep(1) ## check if the shards were created. |