File tree Expand file tree Collapse file tree 1 file changed +11
-15
lines changed Expand file tree Collapse file tree 1 file changed +11
-15
lines changed Original file line number Diff line number Diff line change @@ -334,25 +334,21 @@ def app(environ, start_response):
334334 start_response ("200 OK" , [])
335335 return ["Go get the ball! Good dog!" ]
336336
337- traces_sampler = mock .Mock (return_value = True )
337+ def traces_sampler (sampling_context ):
338+ assert sampling_context ["http.request.method" ] == "GET"
339+ assert sampling_context ["url.path" ] == "/dogs/are/great/"
340+ assert sampling_context ["url.query" ] == "cats=too"
341+ assert sampling_context ["url.scheme" ] == "http"
342+ assert (
343+ sampling_context ["url.full" ] == "http://localhost/dogs/are/great/?cats=too"
344+ )
345+ return True
346+
338347 sentry_init (send_default_pii = True , traces_sampler = traces_sampler )
339348 app = SentryWsgiMiddleware (app )
340349 client = Client (app )
341350
342- client .get ("/dogs/are/great/" )
343-
344- traces_sampler .assert_any_call (
345- DictionaryContaining (
346- {
347- "wsgi_environ" : DictionaryContaining (
348- {
349- "PATH_INFO" : "/dogs/are/great/" ,
350- "REQUEST_METHOD" : "GET" ,
351- },
352- ),
353- }
354- )
355- )
351+ client .get ("/dogs/are/great/?cats=too" )
356352
357353
358354def test_session_mode_defaults_to_request_mode_in_wsgi_handler (
You can’t perform that action at this time.
0 commit comments