How do you use Sentry?
Sentry Saas (sentry.io)
Version
main (1.15.0-16-g2d24560)
Steps to Reproduce
- Observe the lack of
@responses.activate decorator on test_crumb_capture in tests/integrations/stdlib/test_httplib.py
- Apply the following patch:
diff --git a/tests/integrations/stdlib/test_httplib.py b/tests/integrations/stdlib/test_httplib.py
index a66a20c..f1c5dd4 100644
--- a/tests/integrations/stdlib/test_httplib.py
+++ b/tests/integrations/stdlib/test_httplib.py
@@ -31,7 +31,7 @@ from sentry_sdk.integrations.stdlib import StdlibIntegration
def test_crumb_capture(sentry_init, capture_events):
sentry_init(integrations=[StdlibIntegration()])
- url = "http://example.com/"
+ url = "http://example.com/404/"
responses.add(responses.GET, url, status=200)
events = capture_events()
pytest tests/integrations/stdlib/test_httplib.py
- See the test fails because it's actually talking to the webserver on
example.com.
Ref getsentry/responses#373.
Expected Result
Tests mock their network accesses.
Actual Result
Tests require connectivity to http://example.com/ to run
How do you use Sentry?
Sentry Saas (sentry.io)
Version
main (1.15.0-16-g2d24560)
Steps to Reproduce
@responses.activatedecorator ontest_crumb_captureintests/integrations/stdlib/test_httplib.pypytest tests/integrations/stdlib/test_httplib.pyexample.com.Ref getsentry/responses#373.
Expected Result
Tests mock their network accesses.
Actual Result
Tests require connectivity to
http://example.com/to run