~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/codehosting/tests/servers.py

  • Committer: Curtis Hovey
  • Date: 2011-08-21 14:21:06 UTC
  • mto: This revision was merged to the branch mainline in revision 13745.
  • Revision ID: curtis.hovey@canonical.com-20110821142106-x93hajd6iguma8gx
Update test that was enforcing bad grammar.

Show diffs side-by-side

added added

removed removed

Lines of Context:
58
58
 
59
59
class CodeHostingTac(TacTestSetup):
60
60
 
61
 
    def __init__(self, mirrored_area):
 
61
    def __init__(self, hosted_area, mirrored_area):
62
62
        super(CodeHostingTac, self).__init__()
 
63
        # The hosted area.
 
64
        self._hosted_root = hosted_area
63
65
        # The mirrored area.
64
66
        self._mirror_root = mirrored_area
65
67
        # Where the pidfile, logfile etc will go.
67
69
 
68
70
    def clear(self):
69
71
        """Clear the branch areas."""
 
72
        if os.path.isdir(self._hosted_root):
 
73
            shutil.rmtree(self._hosted_root)
 
74
        os.makedirs(self._hosted_root, 0700)
70
75
        if os.path.isdir(self._mirror_root):
71
76
            shutil.rmtree(self._mirror_root)
72
77
        os.makedirs(self._mirror_root, 0700)
75
80
        self.clear()
76
81
 
77
82
    def tearDownRoot(self):
 
83
        shutil.rmtree(self._hosted_root)
78
84
        shutil.rmtree(self._server_root)
79
85
 
80
86
    @property