Fix tests

This commit is contained in:
Ivan Habunek 2023-11-18 15:44:50 +01:00
parent 3de561a060
commit 0265f7e0b7
No known key found for this signature in database
GPG Key ID: F5F0623FF5EBCB3D
1 changed files with 2 additions and 1 deletions

View File

@ -17,6 +17,7 @@ from typing import get_type_hints
from toot.typing_compat import get_args, get_origin
from toot.utils import get_text
from toot.utils.datetime import parse_datetime
@dataclass
@ -454,7 +455,7 @@ def _convert(field_type, value):
return value
if field_type == datetime:
return datetime.strptime(value, "%Y-%m-%dT%H:%M:%S.%f%z").astimezone()
return parse_datetime(value)
if field_type == date:
return date.fromisoformat(value)