~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Martin
  • Date: 2010-05-25 17:27:52 UTC
  • mfrom: (5254 +trunk)
  • mto: This revision was merged to the branch mainline in revision 5257.
  • Revision ID: gzlist@googlemail.com-20100525172752-amm089xcikv968sw
Merge bzr.dev to unite with similar changes already made

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 (
 
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
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."""