mirror of
https://github.com/mvt-project/mvt.git
synced 2026-02-12 16:42:45 +00:00
Continuing enforcement of line length and simplifying date conversions
This commit is contained in:
19
tests/common/test_date_conversions.py
Normal file
19
tests/common/test_date_conversions.py
Normal file
@@ -0,0 +1,19 @@
|
||||
# Mobile Verification Toolkit (MVT)
|
||||
# Copyright (c) 2021-2022 Claudio Guarnieri.
|
||||
# Use of this software is governed by the MVT License 1.1 that can be found at
|
||||
# https://license.mvt.re/1.1/
|
||||
|
||||
from mvt.common.utils import convert_mactime_to_iso, convert_unix_to_iso
|
||||
|
||||
TEST_DATE_EPOCH = 1626566400
|
||||
TEST_DATE_ISO = "2021-07-18 00:00:00.000000"
|
||||
TEST_DATE_MAC = TEST_DATE_EPOCH - 978307200
|
||||
|
||||
|
||||
class TestDateConversions:
|
||||
|
||||
def test_convert_unix_to_iso(self):
|
||||
assert convert_unix_to_iso(TEST_DATE_EPOCH) == TEST_DATE_ISO
|
||||
|
||||
def test_convert_mactime_to_iso(self):
|
||||
assert convert_mactime_to_iso(TEST_DATE_MAC) == TEST_DATE_ISO
|
||||
Reference in New Issue
Block a user