summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/sample_video_dir/sample-vdr1.7/2008-03-28.20.13.10-1.rec/00001.ts (renamed from tests/sample_video_dir/sample-vdr1.7/2008-03-28.20.13.99.99.rec/00001.ts)0
-rw-r--r--tests/sample_video_dir/sample-vdr1.7/2008-03-28.20.13.10-1.rec/00002.ts (renamed from tests/sample_video_dir/sample-vdr1.7/2008-03-28.20.13.99.99.rec/00002.ts)0
-rw-r--r--tests/sample_video_dir/sample-vdr1.7/2008-03-28.20.13.10-1.rec/00003.ts (renamed from tests/sample_video_dir/sample-vdr1.7/2008-03-28.20.13.99.99.rec/00003.ts)0
-rw-r--r--tests/sample_video_dir/sample-vdr1.7/2008-03-28.20.13.10-1.rec/00004.ts (renamed from tests/sample_video_dir/sample-vdr1.7/2008-03-28.20.13.99.99.rec/00004.ts)0
-rw-r--r--tests/sample_video_dir/sample-vdr1.7/2008-03-28.20.13.10-1.rec/info (renamed from tests/sample_video_dir/sample-vdr1.7/2008-03-28.20.13.99.99.rec/info)0
-rw-r--r--tests/test_gettattr.py8
-rw-r--r--tests/test_mpg.py2
-rw-r--r--tests/test_nfo.py2
8 files changed, 10 insertions, 2 deletions
diff --git a/tests/sample_video_dir/sample-vdr1.7/2008-03-28.20.13.99.99.rec/00001.ts b/tests/sample_video_dir/sample-vdr1.7/2008-03-28.20.13.10-1.rec/00001.ts
index 6a537b5..6a537b5 100644
--- a/tests/sample_video_dir/sample-vdr1.7/2008-03-28.20.13.99.99.rec/00001.ts
+++ b/tests/sample_video_dir/sample-vdr1.7/2008-03-28.20.13.10-1.rec/00001.ts
diff --git a/tests/sample_video_dir/sample-vdr1.7/2008-03-28.20.13.99.99.rec/00002.ts b/tests/sample_video_dir/sample-vdr1.7/2008-03-28.20.13.10-1.rec/00002.ts
index c76a964..c76a964 100644
--- a/tests/sample_video_dir/sample-vdr1.7/2008-03-28.20.13.99.99.rec/00002.ts
+++ b/tests/sample_video_dir/sample-vdr1.7/2008-03-28.20.13.10-1.rec/00002.ts
diff --git a/tests/sample_video_dir/sample-vdr1.7/2008-03-28.20.13.99.99.rec/00003.ts b/tests/sample_video_dir/sample-vdr1.7/2008-03-28.20.13.10-1.rec/00003.ts
index 6a537b5..6a537b5 100644
--- a/tests/sample_video_dir/sample-vdr1.7/2008-03-28.20.13.99.99.rec/00003.ts
+++ b/tests/sample_video_dir/sample-vdr1.7/2008-03-28.20.13.10-1.rec/00003.ts
diff --git a/tests/sample_video_dir/sample-vdr1.7/2008-03-28.20.13.99.99.rec/00004.ts b/tests/sample_video_dir/sample-vdr1.7/2008-03-28.20.13.10-1.rec/00004.ts
index c76a964..c76a964 100644
--- a/tests/sample_video_dir/sample-vdr1.7/2008-03-28.20.13.99.99.rec/00004.ts
+++ b/tests/sample_video_dir/sample-vdr1.7/2008-03-28.20.13.10-1.rec/00004.ts
diff --git a/tests/sample_video_dir/sample-vdr1.7/2008-03-28.20.13.99.99.rec/info b/tests/sample_video_dir/sample-vdr1.7/2008-03-28.20.13.10-1.rec/info
index 08787fc..08787fc 100644
--- a/tests/sample_video_dir/sample-vdr1.7/2008-03-28.20.13.99.99.rec/info
+++ b/tests/sample_video_dir/sample-vdr1.7/2008-03-28.20.13.10-1.rec/info
diff --git a/tests/test_gettattr.py b/tests/test_gettattr.py
index 6b215e5..f0af089 100644
--- a/tests/test_gettattr.py
+++ b/tests/test_gettattr.py
@@ -32,6 +32,7 @@ import sys
import os
import unittest
import stat
+import datetime
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
@@ -56,7 +57,14 @@ class TestPathToNodeMapping(unittest.TestCase):
def test_mpg(self):
attr = self.fs.getattr('/sample_2008-03-28.20.13.99.99.rec.mpg')
self.assertEqual(stat.S_IFREG | 0444, attr.st_mode)
+ self.assertEqual(datetime.datetime(2008,3,28,20,13), datetime.datetime.fromtimestamp(attr.st_mtime))
def test_nfo(self):
attr = self.fs.getattr('/sample_2008-03-28.20.13.99.99.rec.nfo')
self.assertEqual(stat.S_IFREG | 0444, attr.st_mode)
+ self.assertEqual(datetime.datetime(2008,3,28,20,13), datetime.datetime.fromtimestamp(attr.st_mtime))
+
+ def test_nfo_new(self):
+ attr = self.fs.getattr('/sample-vdr1.7_2008-03-28.20.13.10-1.rec.nfo')
+ self.assertEqual(stat.S_IFREG | 0444, attr.st_mode)
+ self.assertEqual(datetime.datetime(2008,3,28,20,13), datetime.datetime.fromtimestamp(attr.st_mtime))
diff --git a/tests/test_mpg.py b/tests/test_mpg.py
index 1b93878..cebfec9 100644
--- a/tests/test_mpg.py
+++ b/tests/test_mpg.py
@@ -51,7 +51,7 @@ class TestMpg(unittest.TestCase):
self.assertEqual('1234567890abcdefghij1234567890abcdefghij', node.read(0, 4096))
def test_mpg_new(self):
- node = get_node(self.video, '/sample-vdr1.7_2008-03-28.20.13.99.99.rec.mpg')
+ node = get_node(self.video, '/sample-vdr1.7_2008-03-28.20.13.10-1.rec.mpg')
self.assertEqual(40, node.size())
self.assertEqual('1234567890abcdefghij1234567890abcdefghij', node.read(0, 4096))
diff --git a/tests/test_nfo.py b/tests/test_nfo.py
index 5e6cb2d..71c352d 100644
--- a/tests/test_nfo.py
+++ b/tests/test_nfo.py
@@ -52,7 +52,7 @@ class TestNfo(unittest.TestCase):
self.assertEqual('A movie about something', nfo.find('plot').text)
def test_nfo_new(self):
- node = get_node(self.video, '/sample-vdr1.7_2008-03-28.20.13.99.99.rec.nfo')
+ node = get_node(self.video, '/sample-vdr1.7_2008-03-28.20.13.10-1.rec.nfo')
nfo = xml.etree.ElementTree.fromstring(node.read(0, 4096))
self.assertEqual('Movie Title', nfo.find('title').text)
self.assertEqual('A movie about something', nfo.find('plot').text)