Skip to content
Myr

fixed some error

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

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

  • tests:+5 added−5 removed

1 file+5 added−5 removed

modified:tests/test_requests.py+5 added-5 removed
463 unmodified lines
464 'username, password', (465 ('user', 'pass'),466 (u'имя'.encode('utf-8'), u'пароль'.encode('utf-8')),467 ))468 def test_BASICAUTH_TUPLE_HTTP_200_OK_GET(self, httpbin, username, password, auth_str):468 def test_BASICAUTH_TUPLE_HTTP_200_OK_GET(self, httpbin, username, password):469 auth = (username, password)470 url = httpbin('get')471 472 r = Request('GET', url, auth=auth)471472 r = requests.Request('GET', url, auth=auth)473 p = r.prepare()474475 assert p['Authorization'] == _basic_auth_str(username, password)475 assert p.headers['Authorization'] == _basic_auth_str(username, password)476 477 r = requests.get(url, auth=auth)478 assert r.status_code == 200479
1101 unmodified lines
1581 @pytest.mark.parametrize(1582 'username, password, auth_str', (1583 ('test', 'test', 'Basic dGVzdDp0ZXN0'),1584 (u'имя'.encode('utf-8'), u'пароль'.encode('utf-8'), 'Basic 0LjQvNGPOtC/0LDRgNC+0LvRjA=='),1585 )) 1585 ))1586 def test_basic_auth_str_is_always_native(self, username, password, auth_str):1587 s = _basic_auth_str(username, password)1588 assert isinstance(s, builtin_str)1589 assert s == auth_str
561 unmodified lines