~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/branch_implementations/test_http.py

  • Committer: John Arbash Meinel
  • Author(s): Mark Hammond
  • Date: 2008-09-09 17:02:21 UTC
  • mto: This revision was merged to the branch mainline in revision 3697.
  • Revision ID: john@arbash-meinel.com-20080909170221-svim3jw2mrz0amp3
An updated transparent icon for bzr.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2006-2010 Canonical Ltd
 
1
# Copyright (C) 2006 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
12
12
#
13
13
# You should have received a copy of the GNU General Public License
14
14
# along with this program; if not, write to the Free Software
15
 
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 
15
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
16
16
 
17
17
"""Test branches with inaccessible parents."""
18
18
 
19
 
from bzrlib import (
20
 
    branch,
21
 
    errors,
22
 
    )
23
 
from bzrlib.tests import (
24
 
    per_branch,
25
 
    test_server,
26
 
    )
27
 
 
28
 
 
29
 
class InaccessibleParentTests(per_branch.TestCaseWithBranch):
 
19
import os
 
20
 
 
21
from bzrlib import branch, errors
 
22
from bzrlib.tests.branch_implementations.test_branch import TestCaseWithBranch
 
23
from bzrlib.tests.http_server import HttpServer
 
24
from bzrlib.transport.local import LocalURLServer
 
25
from bzrlib.transport.chroot import TestingChrootServer
 
26
 
 
27
 
 
28
class InaccessibleParentTests(TestCaseWithBranch):
30
29
    """Tests with branches with "inaccessible" parents.
31
 
 
 
30
    
32
31
    An "inaccessible" parent location is one that cannot be represented, e.g. if
33
32
    a child branch says its parent is at "../../my-parent", but that child is at
34
33
    "http://host/one" then that parent location is inaccessible.  These
37
36
 
38
37
    def setUp(self):
39
38
        super(InaccessibleParentTests, self).setUp()
40
 
        if self.transport_server in (test_server.LocalURLServer, None):
41
 
            self.transport_readonly_server = test_server.TestingChrootServer
 
39
        if self.transport_server in (LocalURLServer, None):
 
40
            self.transport_readonly_server = TestingChrootServer
42
41
 
43
42
    def get_branch_with_invalid_parent(self):
44
43
        """Get a branch whose get_parent will raise InaccessibleParent."""