File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change 1818 add_breadcrumb ,
1919 Hub ,
2020 Scope ,
21+ last_event_id ,
2122)
2223from sentry_sdk .integrations import (
2324 _AUTO_ENABLING_INTEGRATIONS ,
@@ -778,3 +779,24 @@ def test_classmethod_tracing(sentry_init):
778779 with patch_start_tracing_child () as fake_start_child :
779780 assert instance_or_class .class_ (1 ) == (TracingTestClass , 1 )
780781 assert fake_start_child .call_count == 1
782+
783+
784+ def test_last_event_id (sentry_init ):
785+ sentry_init ()
786+
787+ assert last_event_id () is None
788+
789+ capture_exception (ValueError ("foo" ))
790+
791+ assert last_event_id () is not None
792+
793+
794+ def test_last_event_id_transaction (sentry_init ):
795+ sentry_init ()
796+
797+ assert last_event_id () is None
798+
799+ with start_transaction ():
800+ pass
801+
802+ assert last_event_id () is None
You can’t perform that action at this time.
0 commit comments