test_functions.py 350 B

123456789101112131415
  1. import datetime
  2. import pytest
  3. import symuid
  4. # pylint: disable=protected-access
  5. @pytest.mark.parametrize(('ts_sec', 'expected_dt'), [
  6. (1528795204,
  7. datetime.datetime(2018, 6, 12, 9, 20, 4, tzinfo=datetime.timezone.utc)),
  8. ])
  9. def test__timestamp_to_utc_dt(ts_sec, expected_dt):
  10. assert expected_dt == symuid._timestamp_to_utc_dt(ts_sec)