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

Missing assert in test_requests.py test_header_validation #6551

Closed
Sjord opened this issue Oct 17, 2023 · 2 comments
Closed

Missing assert in test_requests.py test_header_validation #6551

Sjord opened this issue Oct 17, 2023 · 2 comments

Comments

@Sjord
Copy link

Sjord commented Oct 17, 2023

requests/tests/test_requests.py at main · psf/requests

    def test_header_validation(self, httpbin):
        """Ensure prepare_headers regex isn't flagging valid header contents."""
        valid_headers = {
            "foo": "bar baz qux",
            "bar": b"fbbq",
            "baz": "",
            "qux": "1",
        }
        r = requests.get(httpbin("get"), headers=valid_headers)
        for key in valid_headers.keys():
            valid_headers[key] == r.request.headers[key]

valid_headers[key] == r.request.headers[key] should probably be assert valid_headers[key] == r.request.headers[key].

@swims-hjkl
Copy link
Contributor

I would like to contribute to solve this issue. @sigmavirus24 can I take this up?

nateprewitt added a commit that referenced this issue Oct 18, 2023
#6551  - assert statements for test test_header_validation
@nateprewitt
Copy link
Member

Resolved in #6552

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

No branches or pull requests

4 participants