~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_http.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2007-12-20 20:33:46 UTC
  • mfrom: (3134.1.1 trunk)
  • Revision ID: pqm@pqm.ubuntu.com-20071220203346-toifx0pb5987jcqo
(vila) Fix bug #177643 by handling credentials embedded in urls works
        again for pycurl

Show diffs side-by-side

added added

removed removed

Lines of Context:
1321
1321
        self.assertEquals(expected_prompt, actual_prompt)
1322
1322
 
1323
1323
    def test_no_prompt_for_password_when_using_auth_config(self):
1324
 
        user =' joe'
 
1324
        user ='joe'
1325
1325
        password = 'foo'
1326
1326
        stdin_content = 'bar\n'  # Not the right password
1327
1327
        self.server.add_user(user, password)
1450
1450
    def create_transport_readonly_server(self):
1451
1451
        return ProxyDigestAuthServer()
1452
1452
 
 
1453
 
 
1454
class TestAuth_pycurl(object):
 
1455
    "Tests that can't be applied to pycurl."""
 
1456
 
 
1457
    def test_prompt_for_password(self):
 
1458
        raise tests.TestNotApplicable(
 
1459
            'pycurl cannot prompt, it handles auth by embedding'
 
1460
            ' user:pass in urls only')
 
1461
 
 
1462
    def test_no_prompt_for_password_when_using_auth_config(self):
 
1463
        raise tests.TestNotApplicable(
 
1464
            'pycurl does not support authentication.conf'
 
1465
            ' since it cannot prompt')
 
1466
 
 
1467
 
 
1468
class TestHTTPBasicAuth_pycurl(TestWithTransport_pycurl, TestAuth_pycurl,
 
1469
                               TestHTTPBasicAuth):
 
1470
     """Test http basic authentication scheme for pycurl"""
 
1471
 
 
1472
 
 
1473
class TestHTTPProxyBasicAuth_pycurl(TestWithTransport_pycurl, TestAuth_pycurl,
 
1474
                                    TestHTTPProxyBasicAuth):
 
1475
     """Test proxy basic authentication scheme for pycurl"""
 
1476
 
 
1477
     def test_empty_pass(self):
 
1478
         raise tests.KnownFailure(
 
1479
             'some versions of pycurl does not handle empty proxy passwords')
 
1480
 
 
1481
 
 
1482
class TestHTTPDigestAuth_pycurl(TestWithTransport_pycurl, TestAuth_pycurl,
 
1483
                                TestHTTPDigestAuth):
 
1484
     """Test http digest authentication scheme for pycurl"""
 
1485
 
 
1486
     def test_changing_nonce(self):
 
1487
         raise tests.KnownFailure(
 
1488
             'pycurl does not handle a nonce change')
 
1489
 
 
1490
 
 
1491
class TestHTTPProxyDigestAuth_pycurl(TestWithTransport_pycurl, TestAuth_pycurl,
 
1492
                                     TestHTTPProxyDigestAuth):
 
1493
     """Test http digest authentication scheme for pycurl"""
 
1494
 
 
1495
     def test_empty_pass(self):
 
1496
         raise tests.KnownFailure(
 
1497
             'some versions of pycurl does not handle empty proxy passwords')
 
1498
 
 
1499
     def test_changing_nonce(self):
 
1500
         raise tests.KnownFailure(
 
1501
             'pycurl does not handle a nonce change')
 
1502