summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--combox/events.py10
-rw-r--r--tests/events_test.py8
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.