/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/branch_implementations/test_branch.py

Merge from bzr.dev, resolving the worst of the semantic conflicts, but there's
still a little bit of breakage.

Show diffs side-by-side

added added

removed removed

Lines of Context:
264
264
        branch.set_submit_branch('sftp://example.net')
265
265
        self.assertEqual(branch.get_submit_branch(), 'sftp://example.net')
266
266
        
 
267
    def test_public_branch(self):
 
268
        """public location can be queried and set"""
 
269
        branch = self.make_branch('branch')
 
270
        self.assertEqual(branch.get_public_branch(), None)
 
271
        branch.set_public_branch('sftp://example.com')
 
272
        self.assertEqual(branch.get_public_branch(), 'sftp://example.com')
 
273
        branch.set_public_branch('sftp://example.net')
 
274
        self.assertEqual(branch.get_public_branch(), 'sftp://example.net')
 
275
        branch.set_public_branch(None)
 
276
        self.assertEqual(branch.get_public_branch(), None)
 
277
 
267
278
    def test_record_initial_ghost(self):
268
279
        """Branches should support having ghosts."""
269
280
        wt = self.make_branch_and_tree('.')
307
318
        from bzrlib.testament import Testament
308
319
        strategy = gpg.LoopbackGPGStrategy(None)
309
320
        branch.repository.sign_revision('A', strategy)
310
 
        self.assertEqual(Testament.from_revision(branch.repository, 
311
 
                         'A').as_short_text(),
 
321
        self.assertEqual('-----BEGIN PSEUDO-SIGNED CONTENT-----\n' +
 
322
                         Testament.from_revision(branch.repository,
 
323
                         'A').as_short_text() +
 
324
                         '-----END PSUDO-SIGNED CONTENT-----\n',
312
325
                         branch.repository.get_signature_text('A'))
313
326
 
314
327
    def test_store_signature(self):
320
333
                          branch.repository.has_signature_for_revision_id,
321
334
                          'A')
322
335
        wt.commit("base", allow_pointless=True, rev_id='A')
323
 
        self.assertEqual('FOO', 
 
336
        self.assertEqual('-----BEGIN PSEUDO-SIGNED CONTENT-----\n'
 
337
                         'FOO-----END PSUDO-SIGNED CONTENT-----\n',
324
338
                         branch.repository.get_signature_text('A'))
325
339
 
326
340
    def test_branch_keeps_signatures(self):