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

Unified Diff: tests/parsers/sqlite_plugins/twitter_ios.py

Issue 338460043: [plaso] Refactored timestamp checks in tests #1701 (Closed)
Patch Set: Refactored timestamp checks in tests #1701 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/sqlite_plugins/skype.py ('k') | tests/parsers/sqlite_plugins/zeitgeist.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/parsers/sqlite_plugins/twitter_ios.py
diff --git a/tests/parsers/sqlite_plugins/twitter_ios.py b/tests/parsers/sqlite_plugins/twitter_ios.py
index 4acd8804783d1248e08b2935009c990556601957..dc35f3c5d5f10e316ebeb8f32d0dd3fe22e01c4d 100644
--- a/tests/parsers/sqlite_plugins/twitter_ios.py
+++ b/tests/parsers/sqlite_plugins/twitter_ios.py
@@ -7,7 +7,6 @@ from __future__ import unicode_literals
import unittest
from plaso.lib import definitions
-from plaso.lib import timelib
from plaso.parsers.sqlite_plugins import twitter_ios
from tests import test_lib as shared_test_lib
@@ -35,9 +34,8 @@ class TwitterIOSTest(test_lib.SQLitePluginTestCase):
# Test the first contact creation event.
event = events[0]
- expected_timestamp = timelib.Timestamp.CopyFromString(
- '2007-04-22 14:42:37')
- self.assertEqual(event.timestamp, expected_timestamp)
+
+ self.CheckTimestamp(event.timestamp, '2007-04-22 14:42:37.000000')
self.assertEqual(
event.timestamp_desc, definitions.TIME_DESCRIPTION_CREATION)
@@ -81,9 +79,8 @@ class TwitterIOSTest(test_lib.SQLitePluginTestCase):
# Test first contact modification event.
event = events[1]
- expected_timestamp = timelib.Timestamp.CopyFromString(
- '2015-12-02 15:35:44')
- self.assertEqual(event.timestamp, expected_timestamp)
+
+ self.CheckTimestamp(event.timestamp, '2015-12-02 15:35:44.000000')
self.assertEqual(
event.timestamp_desc, definitions.TIME_DESCRIPTION_UPDATE)
@@ -127,9 +124,8 @@ class TwitterIOSTest(test_lib.SQLitePluginTestCase):
# Test first status creation event.
event = events[50]
- expected_timestamp = timelib.Timestamp.CopyFromString(
- '2014-09-11 11:46:16')
- self.assertEqual(event.timestamp, expected_timestamp)
+
+ self.CheckTimestamp(event.timestamp, '2014-09-11 11:46:16.000000')
self.assertEqual(
event.timestamp_desc, definitions.TIME_DESCRIPTION_CREATION)
@@ -153,9 +149,8 @@ class TwitterIOSTest(test_lib.SQLitePluginTestCase):
# Test first status update event.
event = events[51]
- expected_timestamp = timelib.Timestamp.CopyFromString(
- '2015-12-02 15:39:37')
- self.assertEqual(event.timestamp, expected_timestamp)
+
+ self.CheckTimestamp(event.timestamp, '2015-12-02 15:39:37.000000')
self.assertEqual(
event.timestamp_desc, definitions.TIME_DESCRIPTION_UPDATE)
« no previous file with comments | « tests/parsers/sqlite_plugins/skype.py ('k') | tests/parsers/sqlite_plugins/zeitgeist.py » ('j') | no next file with comments »

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