We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 430391d commit 6d95d00Copy full SHA for 6d95d00
imas/test/test_ids_convert.py
@@ -200,7 +200,8 @@ def test_provenance_entry(factory):
200
timestamp = str(cp4.ids_properties.provenance.node[0].reference[0].timestamp)
201
# Check that timestamp adheres to the format YYYY-MM-DDTHH:MM:SSZ
202
assert re.match(r"\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}Z", timestamp)
203
- dtime = datetime.now(UTC) - datetime.fromisoformat(timestamp)
+ timestamp_for_parsing = timestamp.replace("Z", "+00:00")
204
+ dtime = datetime.now(UTC) - datetime.fromisoformat(timestamp_for_parsing)
205
assert timedelta(seconds=0) <= dtime < timedelta(seconds=2)
206
207
0 commit comments