Skip to content
Myr

Fixed: httpbin doesn't support bytes

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

authored by Dmitry Klimenko · committed by GitHub · parent bf3e960 · Browse files · 1 file+10 added−5 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+10 added−5 removed

  • tests:+10 added−5 removed

1 file+10 added−5 removed

modified:tests/test_requests.py+10 added-5 removed
459 unmodified lines
460 r = requests.put(httpbin('put'))461 assert r.status_code == 200462463 @pytest.mark.parametrize(464 'username, password', (465 ('user', 'pass'),466 (u'имя'.encode('utf-8'), u'пароль'.encode('utf-8')),464 'username, password, auth_str', (465 ('user', 'pass', 'Basic dXNlcjpwYXNz'),466 (u'имя'.encode('utf-8'), u'пароль'.encode('utf-8'), 'Basic 0LjQvNGPOtC/0LDRgNC+0LvRjA=='),467 ))468 def test_BASICAUTH_TUPLE_HTTP_200_OK_GET(self, httpbin, username, password):468 def test_BASICAUTH_TUPLE_HTTP_200_OK_GET(self, httpbin, username, password, auth_str):469 auth = (username, password)470 url = httpbin('basic-auth', username, password)470 url = httpbin('get')471 472 r = Request('GET', url, auth=auth)473 p = r.prepare()474475 assert p['Authorization'] == auth_str476 477 r = requests.get(url, auth=auth)478 assert r.status_code == 200479480 r = requests.get(url)
1665 unmodified lines