@@ -123,6 +123,7 @@ def test_timestamp_override():
123123 )
124124 handler .flush ()
125125 event_capsule = json .loads (output .getvalue ())
126+ event_capsule .pop ("taskName" , None )
126127 assert event_capsule ["__timestamp__" ] == timestamp_override .isoformat () + "Z"
127128
128129
@@ -155,6 +156,7 @@ def test_emit():
155156 handler .flush ()
156157
157158 event_capsule = json .loads (output .getvalue ())
159+ event_capsule .pop ("taskName" , None )
158160
159161 assert "__timestamp__" in event_capsule
160162 # Remove timestamp from capsule when checking equality, since it is gonna vary
@@ -200,6 +202,7 @@ def test_message_field():
200202 handler .flush ()
201203
202204 event_capsule = json .loads (output .getvalue ())
205+ event_capsule .pop ("taskName" , None )
203206
204207 assert "__timestamp__" in event_capsule
205208 # Remove timestamp from capsule when checking equality, since it is gonna vary
@@ -248,6 +251,7 @@ def test_nested_message_field():
248251 handler .flush ()
249252
250253 event_capsule = json .loads (output .getvalue ())
254+ event_capsule .pop ("taskName" , None )
251255
252256 assert "__timestamp__" in event_capsule
253257 # Remove timestamp from capsule when checking equality, since it is gonna vary
@@ -411,6 +415,7 @@ def test_unique_logger_instances():
411415 handler1 .flush ()
412416
413417 event_capsule0 = json .loads (output0 .getvalue ())
418+ event_capsule0 .pop ("taskName" , None )
414419
415420 assert "__timestamp__" in event_capsule0
416421 # Remove timestamp from capsule when checking equality, since it is gonna vary
@@ -424,6 +429,7 @@ def test_unique_logger_instances():
424429 assert event_capsule0 == expected
425430
426431 event_capsule1 = json .loads (output1 .getvalue ())
432+ event_capsule1 .pop ("taskName" , None )
427433
428434 assert "__timestamp__" in event_capsule1
429435 # Remove timestamp from capsule when checking equality, since it is gonna vary
0 commit comments