'Ensure b\'test\' formats as the byte string "test" rather
than the unicode string "b\'test\'" in Python 3.'

def test_basicauth_encodes_byte_strings(self):

    auth = ('\xc5\xafsername', 'test\xc6\xb6')
    r = requests.Request('GET', 'http://localhost', auth=auth)
    p = r.prepare()
    assert (p.headers['Authorization'] == 'Basic    xa9zZXJuYW1lOnRlc3TGtg==')
