Skip to content

Commit 24fc4ad

Browse files
committed
assert directly on server_name
1 parent 45729be commit 24fc4ad

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/test_logs.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ def test_logs_attributes(sentry_init, capture_envelopes):
162162
"""
163163
Passing arbitrary attributes to log messages.
164164
"""
165-
sentry_init(_experiments={"enable_logs": True})
165+
sentry_init(_experiments={"enable_logs": True}, server_name="test-server")
166166
envelopes = capture_envelopes()
167167

168168
attrs = {
@@ -185,7 +185,7 @@ def test_logs_attributes(sentry_init, capture_envelopes):
185185
assert logs[0]["attributes"]["sentry.environment"] == "production"
186186
assert "sentry.release" in logs[0]["attributes"]
187187
assert logs[0]["attributes"]["sentry.message.parameters.my_var"] == "some value"
188-
assert logs[0]["attributes"][SPANDATA.SERVER_ADDRESS]
188+
assert logs[0]["attributes"][SPANDATA.SERVER_ADDRESS] == "test-server"
189189

190190

191191
@minimum_python_37

0 commit comments

Comments
 (0)