~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_bzrdir.py

  • Committer: John Arbash Meinel
  • Date: 2009-01-09 03:13:55 UTC
  • mto: (3932.2.4 1.11)
  • mto: This revision was merged to the branch mainline in revision 3933.
  • Revision ID: john@arbash-meinel.com-20090109031355-rg3grll5bbshstf2
SampleBzrDir now needs to return a real repo from open_repository

Show diffs side-by-side

added added

removed removed

Lines of Context:
180
180
            'Pre-0.8 format.  Slower and does not support checkouts or shared'
181
181
            ' repositories', deprecated=True, alias=True)
182
182
        self.assertEqual(frozenset(['weavealias']), a_registry.aliases())
183
 
    
 
183
 
184
184
 
185
185
class SampleBranch(bzrlib.branch.Branch):
186
186
    """A dummy branch for guess what, dummy use."""
189
189
        self.bzrdir = dir
190
190
 
191
191
 
 
192
class SampleRepository(bzrlib.repository.Repository):
 
193
    """A dummy repo."""
 
194
 
 
195
    def __init__(self, dir):
 
196
        self.bzrdir = dir
 
197
 
 
198
 
192
199
class SampleBzrDir(bzrdir.BzrDir):
193
200
    """A sample BzrDir implementation to allow testing static methods."""
194
201
 
198
205
 
199
206
    def open_repository(self):
200
207
        """See BzrDir.open_repository."""
201
 
        return "A repository"
 
208
        return SampleRepository(self)
202
209
 
203
210
    def create_branch(self):
204
211
        """See BzrDir.create_branch."""