Skip to content

Commit

Permalink
Also in other test
Browse files Browse the repository at this point in the history
  • Loading branch information
antonpirker committed Sep 13, 2024
1 parent a414acb commit 857a9d3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/test_basics.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,9 +326,9 @@ def test_breadcrumb_ordering(sentry_init, capture_events):
events = capture_events()

timestamps = [
datetime.datetime.now() - datetime.timedelta(days=10),
datetime.datetime.now() - datetime.timedelta(days=8),
datetime.datetime.now() - datetime.timedelta(days=12),
datetime.datetime.now(datetime.timezone.utc) - datetime.timedelta(days=10),
datetime.datetime.now(datetime.timezone.utc) - datetime.timedelta(days=8),
datetime.datetime.now(datetime.timezone.utc) - datetime.timedelta(days=12),
]

for timestamp in timestamps:
Expand All @@ -344,8 +344,8 @@ def test_breadcrumb_ordering(sentry_init, capture_events):

assert len(event["breadcrumbs"]["values"]) == len(timestamps)
timestamps_from_event = [
datetime.datetime.strptime(
x["timestamp"].replace("Z", ""), "%Y-%m-%dT%H:%M:%S.%f"
datetime.datetime.strptime(x["timestamp"], "%Y-%m-%dT%H:%M:%S.%fZ").replace(
tzinfo=datetime.timezone.utc
)
for x in event["breadcrumbs"]["values"]
]
Expand Down

0 comments on commit 857a9d3

Please sign in to comment.