1395
1395
osutils.set_or_unset_env(name, value)
1398
class TestHTTPBasicAuth(TestWithTransport_pycurl, TestHTTPAuth,
1399
TestCaseWithWebserver):
1398
class TestHTTPBasicAuth(TestHTTPAuth, TestCaseWithWebserver):
1400
1399
"""Test http basic authentication scheme"""
1401
_transport = HttpTransport_urllib
1402
1403
def create_transport_readonly_server(self):
1403
1404
return HTTPBasicAuthServer()
1406
class TestHTTPProxyBasicAuth(TestWithTransport_pycurl,
1407
TestProxyAuth, TestCaseWithWebserver):
1407
class TestHTTPProxyBasicAuth(TestProxyAuth, TestCaseWithWebserver):
1408
1408
"""Test proxy basic authentication scheme"""
1410
_transport = HttpTransport_urllib
1410
1412
def create_transport_readonly_server(self):
1411
1413
return ProxyBasicAuthServer()
1430
1432
self.assertEqual(2, self.server.auth_required_errors)
1433
class TestHTTPDigestAuth(TestWithTransport_pycurl,
1434
TestHTTPAuth, TestDigestAuth, TestCaseWithWebserver):
1435
class TestHTTPDigestAuth(TestHTTPAuth, TestDigestAuth, TestCaseWithWebserver):
1435
1436
"""Test http digest authentication scheme"""
1438
_transport = HttpTransport_urllib
1437
1440
def create_transport_readonly_server(self):
1438
1441
return HTTPDigestAuthServer()
1441
class TestHTTPProxyDigestAuth(TestWithTransport_pycurl, TestProxyAuth,
1442
TestDigestAuth, TestCaseWithWebserver):
1444
class TestHTTPProxyDigestAuth(TestProxyAuth, TestDigestAuth,
1445
TestCaseWithWebserver):
1443
1446
"""Test proxy digest authentication scheme"""
1448
_transport = HttpTransport_urllib
1445
1450
def create_transport_readonly_server(self):
1446
1451
return ProxyDigestAuthServer()
1454
class TestAuth_pycurl(object):
1455
"Tests that can't be applied to pycurl."""
1457
def test_prompt_for_password(self):
1458
raise tests.KnownFailure(
1459
'pycurl cannot prompt, it handles auth by embedding'
1460
' user:pass in urls only')
1462
def test_no_prompt_for_password_when_using_auth_config(self):
1463
raise tests.KnownFailure(
1464
'pycurl does not support authentication.conf'
1465
' since it cannot prompt')
1468
class TestHTTPBasicAuth_pycurl(TestWithTransport_pycurl, TestAuth_pycurl,
1470
"""Test http basic authentication scheme for pycurl"""
1473
class TestHTTPProxyBasicAuth_pycurl(TestWithTransport_pycurl, TestAuth_pycurl,
1474
TestHTTPProxyBasicAuth):
1475
"""Test proxy basic authentication scheme for pycurl"""
1478
class TestHTTPDigestAuth_pycurl(TestWithTransport_pycurl, TestAuth_pycurl,
1479
TestHTTPDigestAuth):
1480
"""Test http digest authentication scheme for pycurl"""
1482
def test_changing_nonce(self):
1483
raise tests.KnownFailure(
1484
'pycurl does not handle a nonce change')
1487
class TestHTTPProxyDigestAuth_pycurl(TestWithTransport_pycurl, TestAuth_pycurl,
1488
TestHTTPProxyDigestAuth):
1489
"""Test http digest authentication scheme for pycurl"""
1491
def test_changing_nonce(self):
1492
raise tests.KnownFailure(
1493
'pycurl does not handle a nonce change')