~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_http.py

  • Committer: Vincent Ladeuil
  • Date: 2007-12-28 16:51:30 UTC
  • mto: (3146.3.1 179368) (3156.2.1 trunk)
  • mto: This revision was merged to the branch mainline in revision 3158.
  • Revision ID: v.ladeuil+lp@free.fr-20071228165130-iv5p12lfc2fmbb7u
Update NEWS. Some cosmetic changes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
# along with this program; if not, write to the Free Software
15
15
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
16
16
 
17
 
"""Tests for HTTP test framework and implementation neutral code.
 
17
"""Tests for HTTP implementations.
18
18
 
19
 
Code that need to be tested against implementations or variations of the HTTP
20
 
protocol should go in test_http_implementations.py
 
19
This module defines a load_tests() method that parametrize tests classes for
 
20
transport implementation, http protocol versions and authentication schemes.
21
21
"""
22
22
 
23
23
# TODO: Should be renamed to bzrlib.transport.http.tests?
140
140
    tpa_adapter = TransportProtocolAuthenticationAdapter()
141
141
    tpa_classes = (TestAuth,
142
142
                   )
143
 
    is_also_testing_for_authentication = tests.condition_isinstance(tpa_classes)
 
143
    is_also_testing_for_authentication = tests.condition_isinstance(
 
144
        tpa_classes)
144
145
 
145
146
    result = loader.suiteClass()
146
147
    for test_class in tests.iter_suite_tests(standard_tests):
323
324
        url = http.extract_auth('http://example.com', f)
324
325
        self.assertEquals('http://example.com', url)
325
326
        self.assertEquals(0, len(f.credentials))
326
 
        url = http.extract_auth('http://user:pass@www.bazaar-vcs.org/bzr/bzr.dev', f)
 
327
        url = http.extract_auth(
 
328
            'http://user:pass@www.bazaar-vcs.org/bzr/bzr.dev', f)
327
329
        self.assertEquals('http://www.bazaar-vcs.org/bzr/bzr.dev', url)
328
330
        self.assertEquals(1, len(f.credentials))
329
331
        self.assertEquals([None, 'www.bazaar-vcs.org', 'user', 'pass'],