summaryrefslogtreecommitdiff
path: root/tests/test_manifest.py
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2017-10-22 23:09:28 +0200
committerMichał Górny <mgorny@gentoo.org>2017-10-22 23:09:28 +0200
commit49579c0b949952fdf4710c58c6c797cac6b9b582 (patch)
tree42852025c5b6bcb0bd04a43864fa8e332aa81337 /tests/test_manifest.py
parent3b75ac6544c2b863c9b8d6e6c1758f673aa9159f (diff)
downloadgemato-49579c0b949952fdf4710c58c6c797cac6b9b582.tar.gz
manifest: Support finding the timestamp
Diffstat (limited to 'tests/test_manifest.py')
-rw-r--r--tests/test_manifest.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/test_manifest.py b/tests/test_manifest.py
index 5e72a8a..43c7e18 100644
--- a/tests/test_manifest.py
+++ b/tests/test_manifest.py
@@ -58,6 +58,12 @@ class ManifestTest(unittest.TestCase):
m.dump(outf)
self.assertEqual(outf.getvalue().strip(), TEST_DEPRECATED_MANIFEST.strip())
+ def test_find_timestamp(self):
+ m = gemato.manifest.ManifestFile()
+ m.load(io.StringIO(TEST_MANIFEST))
+ self.assertEqual(m.find_timestamp().ts,
+ datetime.datetime(2017, 10, 22, 18, 06, 41))
+
def test_find_path_entry(self):
m = gemato.manifest.ManifestFile()
m.load(io.StringIO(TEST_MANIFEST))