#NEWLINE# def test_auth_failed( tmpdir , scheme ) : #NEWLINE# #INDENT# 'Ensure that we can save failed auth statuses' #NEWLINE# auth = ( 'user' , 'wrongwrongwrong' ) #NEWLINE# url = ( scheme + '://httpbin.org/basic-auth/user/passwd' ) #NEWLINE# with vcr . use_cassette ( str ( tmpdir . join ( 'auth-failed.yaml' ) ) ) as cass : #NEWLINE# #INDENT# assert_cassette_empty ( cass ) #NEWLINE# one = requests . get ( url , auth = auth ) #NEWLINE# two = requests . get ( url , auth = auth ) #NEWLINE# assert ( one . content == two . content ) #NEWLINE# assert ( one . status_code == two . status_code == 401 )