File tree Expand file tree Collapse file tree 1 file changed +14
-11
lines changed Expand file tree Collapse file tree 1 file changed +14
-11
lines changed Original file line number Diff line number Diff line change @@ -123,8 +123,10 @@ def test_login(client_login):
123
123
def test_receive_event (client_login ):
124
124
event_id = None
125
125
client , _ = client_login
126
- with sentry_sdk .init (dsn = get_sentry_dsn (client )):
127
- event_id = sentry_sdk .capture_exception (Exception ("a failure" ))
126
+
127
+ sentry_sdk .init (dsn = get_sentry_dsn (client ))
128
+
129
+ event_id = sentry_sdk .capture_exception (Exception ("a failure" ))
128
130
assert event_id is not None
129
131
response = poll_for_response (
130
132
f"{ SENTRY_TEST_HOST } /api/0/projects/sentry/internal/events/{ event_id } /" , client
@@ -377,18 +379,19 @@ def test_custom_certificate_authorities():
377
379
378
380
def test_receive_transaction_events (client_login ):
379
381
client , _ = client_login
380
- with sentry_sdk .init (
382
+ sentry_sdk .init (
381
383
dsn = get_sentry_dsn (client ), profiles_sample_rate = 1.0 , traces_sample_rate = 1.0
382
- ):
384
+ )
385
+
386
+ def placeholder_fn ():
387
+ sum = 0
388
+ for i in range (5 ):
389
+ sum += i
390
+ time .sleep (0.25 )
383
391
384
- def placeholder_fn ():
385
- sum = 0
386
- for i in range (5 ):
387
- sum += i
388
- time .sleep (0.25 )
392
+ with sentry_sdk .start_transaction (op = "task" , name = "Test Transactions" ):
393
+ placeholder_fn ()
389
394
390
- with sentry_sdk .start_transaction (op = "task" , name = "Test Transactions" ):
391
- placeholder_fn ()
392
395
poll_for_response (
393
396
f"{ SENTRY_TEST_HOST } /api/0/organizations/sentry/events/?dataset=profiles&field=profile.id&project=1&statsPeriod=1h" ,
394
397
client ,
You can’t perform that action at this time.
0 commit comments