Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
antonpirker committed Jul 28, 2023
1 parent dfa12a4 commit 0be3b1b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion sentry_sdk/integrations/pymongo.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def _strip_pii(command):


def _get_db_data(event):
# type: (Union[CommandFailedEvent, CommandStartedEvent, CommandSucceededEvent]) -> Dict[str, Any]
# type: (Any) -> Dict[str, Any]
data = {}

data[SPANDATA.DB_SYSTEM] = "mongodb"
Expand Down
8 changes: 2 additions & 6 deletions tests/integrations/sqlalchemy/test_sqlalchemy.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,12 +123,8 @@ class Address(Base):
for span in event["spans"]:
assert span["data"][SPANDATA.DB_SYSTEM] == "sqlite"
assert span["data"][SPANDATA.DB_NAME] == ":memory:"
assert (
span["data"][SPANDATA.SERVER_ADDRESS] is None
) # sqlite does not have a server
assert (
span["data"][SPANDATA.SERVER_PORT] is None
) # sqlite does not have a server
assert SPANDATA.SERVER_ADDRESS not in span["data"]
assert SPANDATA.SERVER_PORT not in span["data"]

assert (
render_span_tree(event)
Expand Down

0 comments on commit 0be3b1b

Please sign in to comment.