Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use sentry_init fixture in tests instead of using Hub directly #759

Merged
merged 2 commits into from
Jul 10, 2020

Conversation

alexmojaki
Copy link
Contributor

@untitaker how's this?

Based on #749 (comment)

@@ -149,41 +156,41 @@ def test_proxy_httpsselect_bothenv_http(monkeypatch):
assert client.transport._pool.proxy.scheme == "http"


def test_simple_transport():
def test_simple_transport(sentry_init):
events = []
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You do not need to pass in a transport if you're using sentry_init, just use the capture_events fixture instead which does the same thing.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did that at first but then decided that wasn't in the spirit of the original test and the name test_simple_transport.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah well you're right

@untitaker untitaker merged commit 0ee6a25 into getsentry:master Jul 10, 2020
@untitaker
Copy link
Member

Thanks! Not entirely sure why project coverage is still there. I think I disabled it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants