Skip to content
Myr

Tests for #1767.

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Cory Benfield · committed by Cory Benfield · parent 8477355 · Browse files · 1 file+12 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+12 added−0 removed

  • other:+12 added−0 removed

1 file+12 added−0 removed

modified:test_requests.py+12 added
561 unmodified lines
562 def test_get_auth_from_url(self):563 url = 'http://user:pass@complex.url.com/path?query=yes'564 assert ('user', 'pass') == requests.utils.get_auth_from_url(url)565566 def test_get_auth_from_url_encoded_spaces(self):567 url = 'http://user:pass%20pass@complex.url.com/path?query=yes'568 assert ('user', 'pass pass') == requests.utils.get_auth_from_url(url)569570 def test_get_auth_from_url_not_encoded_spaces(self):571 url = 'http://user:pass pass@complex.url.com/path?query=yes'572 assert ('user', 'pass pass') == requests.utils.get_auth_from_url(url)573574 def test_get_auth_from_url_percent_chars(self):575 url = 'http://user%user:pass@complex.url.com/path?query=yes'576 assert ('user%user', 'pass') == requests.utils.get_auth_from_url(url)577578 def test_cannot_send_unprepared_requests(self):579 r = requests.Request(url=HTTPBIN)580 with pytest.raises(ValueError):581 requests.Session().send(r)
345 unmodified lines