Skip to content

Commit

Permalink
Make tests compatible with higher versions of opentelemtry
Browse files Browse the repository at this point in the history
  • Loading branch information
samuel-malpass committed Oct 10, 2024
1 parent 5602f28 commit fdb451e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions tests/test_entrypoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ def test_exception(self, container, memory_exporter):

event = span.events[0]
assert event.name == "exception"
assert event.attributes["exception.type"] == "Error"
assert event.attributes["exception.type"].endswith("Error")
assert event.attributes["exception.message"] == "boom"
assert 'raise self.Error("boom")' in event.attributes["exception.stacktrace"]
assert event.attributes["exception.escaped"] == "True"
Expand All @@ -381,7 +381,7 @@ def test_expected_exception(self, container, memory_exporter):

event = span.events[0]
assert event.name == "exception"
assert event.attributes["exception.type"] == "Error"
assert event.attributes["exception.type"].endswith("Error")
assert event.attributes["exception.message"] == "boom"
assert 'raise self.Error("boom")' in event.attributes["exception.stacktrace"]
assert event.attributes["exception.escaped"] == "True"
Expand All @@ -408,7 +408,7 @@ def test_unserializable_exception(

event = span.events[0]
assert event.name == "exception"
assert event.attributes["exception.type"] == "Error"
assert event.attributes["exception.type"].endswith("Error")
assert event.attributes["exception.message"] == "boom"
assert (
"Exception occurred on stacktrace formatting"
Expand Down
4 changes: 2 additions & 2 deletions tests/test_http.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ def test_exception(self, container, web_session, memory_exporter):

event = span.events[0]
assert event.name == "exception"
assert event.attributes["exception.type"] == "Error"
assert event.attributes["exception.type"].endswith("Error")
assert event.attributes["exception.message"] == "boom"
assert 'raise self.Error("boom")' in event.attributes["exception.stacktrace"]
assert event.attributes["exception.escaped"] == "True"
Expand All @@ -342,7 +342,7 @@ def test_expected_exception(self, container, web_session, memory_exporter):

event = span.events[0]
assert event.name == "exception"
assert event.attributes["exception.type"] == "Error"
assert event.attributes["exception.type"].endswith("Error")
assert event.attributes["exception.message"] == "boom"
assert 'raise self.Error("boom")' in event.attributes["exception.stacktrace"]
assert event.attributes["exception.escaped"] == "True"
Expand Down

0 comments on commit fdb451e

Please sign in to comment.