Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
berggren committed Oct 25, 2023
1 parent 40c1c99 commit cdc2632
Showing 1 changed file with 21 additions and 22 deletions.
43 changes: 21 additions & 22 deletions timesketch/lib/utils_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,30 +203,34 @@ def test_timestamp_is_ISOformat(self):
# Make sure timestamp is processed correctly, and the format is not altered
expected_outputs = [
{
"message": "Checking timestamp conversion",
"timestamp": 1331698658000000,
"datetime": "2012-03-14T04:17:38+00:00",
"timestamp_desc": "Time Logged",
"data_type": "This event has timestamp",
"message": "Checking timestamp conversion",
"timestamp": 1331698658000000,
"datetime": "2012-03-14T04:17:38+00:00",
"timestamp_desc": "Time Logged",
"data_type": "This event has timestamp",
},
{
"message": "Checking timestamp conversion",
"timestamp": 1658689261000000,
"datetime": "2022-07-24T19:01:01+00:00",
"timestamp_desc": "Time Logged",
"data_type": "This event has timestamp",
"message": "Checking timestamp conversion",
"timestamp": 1658689261000000,
"datetime": "2022-07-24T19:01:01+00:00",
"timestamp_desc": "Time Logged",
"data_type": "This event has timestamp",
},
{
"message": "Make sure message is same",
"timestamp": 1437789661000000,
"datetime": "2015-07-25T02:01:01+00:00",
"timestamp_desc": "Logging",
"data_type": "This data_type should stay the same",
"message": "Make sure message is same",
"timestamp": 1437789661000000,
"datetime": "2015-07-25T02:01:01+00:00",
"timestamp_desc": "Logging",
"data_type": "This data_type should stay the same",
},
]
results = iter(read_and_validate_csv("test_tools/test_events/validate_timestamp_conversion.csv"))
results = iter(
read_and_validate_csv(
"test_tools/test_events/validate_timestamp_conversion.csv"
)
)
for output in expected_outputs:
self.assertDictEqual(next(results),output)
self.assertDictEqual(next(results), output)

def test_invalid_JSONL_file(self):
"""Test for JSONL with missing keys in the dictionary wrt headers mapping"""
Expand Down Expand Up @@ -292,8 +296,3 @@ def test_valid_JSONL_file(self):
self.assertTrue(
isinstance(rename_jsonl_headers(linedict, headers_mapping, lineno), dict)
)





0 comments on commit cdc2632

Please sign in to comment.