Skip to content

Commit ff23df2

Browse files
committed
Use strptime for backwards compatibility
1 parent 5ebf563 commit ff23df2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def validator(data_json):
5050
)
5151
if v["type"] == "datetime":
5252
try:
53-
datetime.datetime.fromisoformat(data[k].rstrip("Z"))
53+
datetime.datetime.strptime(data[k], "%Y-%m-%dT%H:%M:%S.%fZ")
5454
except ValueError:
5555
raise ValidationError(
5656
"Value {0} for key {1} doesn't parse as an ISO datetime".format(

0 commit comments

Comments
 (0)