Skip to content

Commit e897304

Browse files
cleanup
1 parent 3dc9397 commit e897304

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

tests/test_api_sessions.py

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
import sentry_sdk
2-
import pytest
3-
from sentry_sdk import start_session, end_session, capture_exception
4-
from sentry_sdk.sessions import track_session
52

63

74
def test_start_session_basic(sentry_init, capture_envelopes):
@@ -10,10 +7,10 @@ def test_start_session_basic(sentry_init, capture_envelopes):
107
envelopes = capture_envelopes()
118

129
# Start a session using the top-level API
13-
start_session()
14-
10+
sentry_sdk.start_session()
11+
1512
# End the session
16-
end_session()
13+
sentry_sdk.end_session()
1714
sentry_sdk.flush()
1815

1916
# Check that we got a session envelope
@@ -26,7 +23,6 @@ def test_start_session_basic(sentry_init, capture_envelopes):
2623
"release": "test-release",
2724
"environment": "test-env",
2825
}
29-
assert sess_event["init"]
3026
assert sess_event["status"] == "exited"
3127

3228

@@ -36,8 +32,8 @@ def test_start_session_with_mode(sentry_init, capture_envelopes):
3632
envelopes = capture_envelopes()
3733

3834
# Start a session with request mode
39-
start_session(session_mode="request")
40-
end_session()
35+
sentry_sdk.start_session(session_mode="request")
36+
sentry_sdk.end_session()
4137
sentry_sdk.flush()
4238

4339
# Request mode sessions are aggregated

0 commit comments

Comments
 (0)