test_datetime.py 232 B

12345678910
  1. import datetime
  2. import pytz
  3. from symuid._datetime import datetime_utc_now
  4. def test_datetime_utc_now():
  5. pytz_dt = datetime.datetime.now(pytz.timezone('UTC'))
  6. assert abs((datetime_utc_now() - pytz_dt).total_seconds()) < 5