Skip to content

tests: parametrize proxy tests - #836

Merged
untitaker merged 3 commits into
getsentry:masterfrom
xavfernandez:parametrize_proxy_tests
Sep 24, 2020
Merged

untitaker merged 3 commits into
getsentry:masterfrom
xavfernandez:parametrize_proxy_tests

Conversation

@xavfernandez

Copy link
Copy Markdown
Contributor

While working on adding tests for an other feature, I stumbled on those tests and found it hard to check which cases were tested among the 16 present tests.

Hopefully it's easier to read in the new version.

@untitaker untitaker left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

thanks for working on this, I'd like one change though

Comment thread tests/test_client.py Outdated
@pytest.mark.parametrize(
"dsn,env_http_proxy,env_https_proxy,arg_http_proxy,arg_https_proxy,expected_proxy_scheme",
[
("http://foo@sentry.io/123", None, None, "http://localhost/123", None, "http"),

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I wonder if instead of these tuples we should have one parameter called testcase and pass dictionaries into the testcase. I think this is hard to read because you need to memorize which tuple index maps to which param.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done :)

@untitaker
untitaker merged commit db86d61 into getsentry:master Sep 24, 2020
@untitaker

Copy link
Copy Markdown
Member

excellent, thanks!

@xavfernandez
xavfernandez deleted the parametrize_proxy_tests branch September 24, 2020 21:21
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