summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authoretobi <git@e-tobi.net>2011-10-10 20:52:45 +0200
committeretobi <git@e-tobi.net>2011-10-10 20:52:45 +0200
commitaad3cec396e544bf3d4c90eecdd1dc1527e69d14 (patch)
tree5268ea4de4c95f44b7182accc181ee5bb5b06ea0 /tests
parent153e04c08343cade8fff478829a2845092d9cf98 (diff)
downloadvdrnfofs-aad3cec396e544bf3d4c90eecdd1dc1527e69d14.tar.gz
vdrnfofs-aad3cec396e544bf3d4c90eecdd1dc1527e69d14.tar.bz2
Set mtime of dir nodes to original directories mtime
Diffstat (limited to 'tests')
-rw-r--r--tests/test_gettattr.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/test_gettattr.py b/tests/test_gettattr.py
index f0af089..9e6cf47 100644
--- a/tests/test_gettattr.py
+++ b/tests/test_gettattr.py
@@ -43,6 +43,8 @@ class TestPathToNodeMapping(unittest.TestCase):
def setUp(self):
self.fs = VdrNfoFs()
self.fs.video = self.video_dir = os.path.abspath(os.path.dirname(__file__) + '/sample_video_dir')
+ time_stamp = time.mktime(datetime.datetime(2011,1,1,11,11).timetuple())
+ os.utime(self.fs.video + '/folder', (time_stamp, time_stamp))
def test_root(self):
attr = self.fs.getattr('/')
@@ -52,6 +54,7 @@ class TestPathToNodeMapping(unittest.TestCase):
def test_dir(self):
attr = self.fs.getattr('/folder')
self.assertEqual(stat.S_IFDIR | 0555, attr.st_mode)
+ self.assertEqual(datetime.datetime(2011,1,1,11,11), datetime.datetime.fromtimestamp(attr.st_mtime))
self.assertEqual(2 + 6, attr.st_nlink)
def test_mpg(self):