/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

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

  • Committer: Martin von Gagern
  • Date: 2010-04-20 08:47:38 UTC
  • mfrom: (5167 +trunk)
  • mto: This revision was merged to the branch mainline in revision 5195.
  • Revision ID: martin.vgagern@gmx.net-20100420084738-ygymnqmdllzrhpfn
merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2006 Canonical Ltd
 
1
# Copyright (C) 2006-2010 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
16
 
17
17
"""Test branches with inaccessible parents."""
18
18
 
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):
 
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):
29
30
    """Tests with branches with "inaccessible" parents.
30
 
    
 
31
 
31
32
    An "inaccessible" parent location is one that cannot be represented, e.g. if
32
33
    a child branch says its parent is at "../../my-parent", but that child is at
33
34
    "http://host/one" then that parent location is inaccessible.  These
36
37
 
37
38
    def setUp(self):
38
39
        super(InaccessibleParentTests, self).setUp()
39
 
        if self.transport_server in (LocalURLServer, None):
40
 
            self.transport_readonly_server = TestingChrootServer
 
40
        if self.transport_server in (test_server.LocalURLServer, None):
 
41
            self.transport_readonly_server = test_server.TestingChrootServer
41
42
 
42
43
    def get_branch_with_invalid_parent(self):
43
44
        """Get a branch whose get_parent will raise InaccessibleParent."""