Commit e5192e4b by Őry Máté

common: fix tests

parent b94c4c54
...@@ -433,7 +433,7 @@ class HumanReadableObject(object): ...@@ -433,7 +433,7 @@ class HumanReadableObject(object):
try: try:
v = timezone.datetime.strptime( v = timezone.datetime.strptime(
v, "%Y-%m-%dT%H:%M:%S.%fZ").replace(tzinfo=timezone.UTC()) v, "%Y-%m-%dT%H:%M:%S.%fZ").replace(tzinfo=timezone.UTC())
except ValueError: except (ValueError, TypeError): # Mock raises TypeError
pass pass
if isinstance(v, timezone.datetime): if isinstance(v, timezone.datetime):
params[k] = defaultfilters.date(v, "DATETIME_FORMAT") params[k] = defaultfilters.date(v, "DATETIME_FORMAT")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment