summaryrefslogtreecommitdiffstats
path: root/tests/file_test.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/file_test.py')
-rw-r--r--tests/file_test.py14
1 files changed, 11 insertions, 3 deletions
diff --git a/tests/file_test.py b/tests/file_test.py
index ccd54b0..0e19e60 100644
--- a/tests/file_test.py
+++ b/tests/file_test.py
@@ -22,6 +22,7 @@ from hashlib import sha512
from glob import glob
from nose.tools import *
from os import path, remove
+from shutil import copyfile
from combox.config import get_nodedirs
from combox.crypto import split_and_encrypt
@@ -154,13 +155,20 @@ class TestFile(object):
assert foo_nodedir == node_path(foo_dir, self.config)
- def test_rmdir(self):
- """Tests rm_dir function"""
+ def test_rmpath(self):
+ """Tests rm_path function"""
new_dir = path.join(self.config['combox_dir'], 'fooius')
os.mkdir(new_dir)
assert path.isdir(new_dir)
- rm_dir(new_dir)
+ new_file = path.join(new_dir, 'fooius.ext')
+ copyfile(self.TEST_FILE, new_file)
+ assert path.isfile(new_file)
+
+ rm_path(new_file)
+ assert not path.isfile(new_file)
+
+ rm_path(new_dir)
assert not path.isdir(new_dir)