Skip to content

Commit

Permalink
Modify test case to account for changes
Browse files Browse the repository at this point in the history
  • Loading branch information
retrry committed Oct 20, 2024
1 parent 35d2977 commit 255de61
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,10 @@ def _get_route_details(scope, app=None):
"""
Function to retrieve the full route path, handling mounted sub-applications (Mount) recursively.
TODO: there is currently no way to retrieve http.route from
a starlette application from scope.
See: https://github.com/encode/starlette/pull/804
Args:
scope: A FastAPI/Starlette scope
app: The FastAPI/Starlette app or sub-app (defaults to the app in scope)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,7 @@ def test_sub_app_fastapi_call(self):
spans = self.memory_exporter.get_finished_spans()
self.assertEqual(len(spans), 3)
for span in spans:
# As we are only looking to the "outer" app, we would see only the "GET /sub" spans
self.assertIn("GET /sub", span.name)
self.assertIn("GET /sub/home", span.name)

# We now want to specifically test all spans including the
# - HTTP_TARGET
Expand Down

0 comments on commit 255de61

Please sign in to comment.