mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Co-authored-by: Nicola Soranzo <nicola.soranzo@gmail.com>
15 lines
375 B
Python
15 lines
375 B
Python
from pydantic import BaseModel
|
|
|
|
from galaxy.schema.types import OffsetNaiveDatetime
|
|
|
|
|
|
class Time(BaseModel):
|
|
time: OffsetNaiveDatetime
|
|
|
|
|
|
def test_naive_datetime_parsing():
|
|
with_tz = Time(time="2022-08-15T11:29:32.853974+02:00")
|
|
without_tz = Time(time="2022-08-15T09:29:32.853974")
|
|
assert with_tz.time == without_tz.time
|
|
assert with_tz.time.tzinfo is None
|