~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_http.py

  • Committer: John Arbash Meinel
  • Date: 2006-05-06 17:54:19 UTC
  • mto: This revision was merged to the branch mainline in revision 1705.
  • Revision ID: john@arbash-meinel.com-20060506175419-fe86b1f2a9e88a53
Updated web page url to http://bazaar-vcs.org

Show diffs side-by-side

added added

removed removed

Lines of Context:
41
41
        url = extract_auth('http://example.com', f)
42
42
        self.assertEquals('http://example.com', url)
43
43
        self.assertEquals(0, len(f.credentials))
44
 
        url = extract_auth('http://user:pass@www.bazaar-ng.org/bzr/bzr.dev', f)
45
 
        self.assertEquals('http://www.bazaar-ng.org/bzr/bzr.dev', url)
 
44
        url = extract_auth('http://user:pass@www.bazaar-vcs.org/bzr/bzr.dev', f)
 
45
        self.assertEquals('http://www.bazaar-vcs.org/bzr/bzr.dev', url)
46
46
        self.assertEquals(1, len(f.credentials))
47
 
        self.assertEquals([None, 'www.bazaar-ng.org', 'user', 'pass'], f.credentials[0])
 
47
        self.assertEquals([None, 'www.bazaar-vcs.org', 'user', 'pass'], f.credentials[0])
48
48
        
49
49
    def test_abs_url(self):
50
50
        """Construction of absolute http URLs"""
51
 
        t = HttpTransport_urllib('http://bazaar-ng.org/bzr/bzr.dev/')
 
51
        t = HttpTransport_urllib('http://bazaar-vcs.org/bzr/bzr.dev/')
52
52
        eq = self.assertEqualDiff
53
53
        eq(t.abspath('.'),
54
 
           'http://bazaar-ng.org/bzr/bzr.dev')
 
54
           'http://bazaar-vcs.org/bzr/bzr.dev')
55
55
        eq(t.abspath('foo/bar'), 
56
 
           'http://bazaar-ng.org/bzr/bzr.dev/foo/bar')
 
56
           'http://bazaar-vcs.org/bzr/bzr.dev/foo/bar')
57
57
        eq(t.abspath('.bzr'),
58
 
           'http://bazaar-ng.org/bzr/bzr.dev/.bzr')
 
58
           'http://bazaar-vcs.org/bzr/bzr.dev/.bzr')
59
59
        eq(t.abspath('.bzr/1//2/./3'),
60
 
           'http://bazaar-ng.org/bzr/bzr.dev/.bzr/1/2/3')
 
60
           'http://bazaar-vcs.org/bzr/bzr.dev/.bzr/1/2/3')
61
61
 
62
62
    def test_invalid_http_urls(self):
63
63
        """Trap invalid construction of urls"""
64
 
        t = HttpTransport_urllib('http://bazaar-ng.org/bzr/bzr.dev/')
 
64
        t = HttpTransport_urllib('http://bazaar-vcs.org/bzr/bzr.dev/')
65
65
        self.assertRaises(ValueError,
66
66
            t.abspath,
67
67
            '.bzr/')