Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(797)

Unified Diff: tests/parsers/winjob.py

Issue 338460043: [plaso] Refactored timestamp checks in tests #1701 (Closed)
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/parsers/winfirewall.py ('k') | tests/parsers/winlnk.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/parsers/winjob.py
diff --git a/tests/parsers/winjob.py b/tests/parsers/winjob.py
index 2ee354d54c8883242d086ccb8519d4c3fd1d3407..f63ab28bfd81324cd2fe646c5b44e8ccc56dc436 100644
--- a/tests/parsers/winjob.py
+++ b/tests/parsers/winjob.py
@@ -8,7 +8,6 @@ import unittest
from plaso.formatters import winjob as _ # pylint: disable=unused-import
from plaso.lib import definitions
-from plaso.lib import timelib
from plaso.parsers import winjob
from tests import test_lib as shared_test_lib
@@ -30,9 +29,7 @@ class WinJobTest(test_lib.ParserTestCase):
event = events[0]
- expected_timestamp = timelib.Timestamp.CopyFromString(
- '2013-08-24 12:42:00.112')
- self.assertEqual(event.timestamp, expected_timestamp)
+ self.CheckTimestamp(event.timestamp, '2013-08-24 12:42:00.112000')
self.assertEqual(
event.timestamp_desc, definitions.TIME_DESCRIPTION_LAST_RUN)
@@ -53,9 +50,7 @@ class WinJobTest(test_lib.ParserTestCase):
# Parse second event. Same metadata; different timestamp event.
event = events[1]
- expected_timestamp = timelib.Timestamp.CopyFromString(
- '2013-07-12 15:42:00')
- self.assertEqual(event.timestamp, expected_timestamp)
+ self.CheckTimestamp(event.timestamp, '2013-07-12 15:42:00.000000')
self.assertEqual(event.timestamp_desc, 'Scheduled to start')
self.assertEqual(event.trigger_type, 1)
« no previous file with comments | « tests/parsers/winfirewall.py ('k') | tests/parsers/winlnk.py » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b