/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: John Arbash Meinel
  • Date: 2010-02-10 17:52:08 UTC
  • mfrom: (5021 +trunk)
  • mto: This revision was merged to the branch mainline in revision 5023.
  • Revision ID: john@arbash-meinel.com-20100210175208-bubuwav4uqigu291
Merge bzr.dev 5021 to resolve NEWS

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
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.http_server import HttpServer
23
 
from bzrlib.tests.per_branch.test_branch import TestCaseWithBranch
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 per_branch
 
24
from bzrlib.transport import (
 
25
    chroot,
 
26
    local,
 
27
    )
 
28
 
 
29
 
 
30
class InaccessibleParentTests(per_branch.TestCaseWithBranch):
29
31
    """Tests with branches with "inaccessible" parents.
30
32
 
31
33
    An "inaccessible" parent location is one that cannot be represented, e.g. if
36
38
 
37
39
    def setUp(self):
38
40
        super(InaccessibleParentTests, self).setUp()
39
 
        if self.transport_server in (LocalURLServer, None):
40
 
            self.transport_readonly_server = TestingChrootServer
 
41
        if self.transport_server in (local.LocalURLServer, None):
 
42
            self.transport_readonly_server = chroot.TestingChrootServer
41
43
 
42
44
    def get_branch_with_invalid_parent(self):
43
45
        """Get a branch whose get_parent will raise InaccessibleParent."""