/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

Show diffs side-by-side

added added

removed removed

Lines of Context:
271
271
        branch.set_submit_branch('sftp://example.net')
272
272
        self.assertEqual(branch.get_submit_branch(), 'sftp://example.net')
273
273
        
 
274
    def test_public_branch(self):
 
275
        """public location can be queried and set"""
 
276
        branch = self.make_branch('branch')
 
277
        self.assertEqual(branch.get_public_branch(), None)
 
278
        branch.set_public_branch('sftp://example.com')
 
279
        self.assertEqual(branch.get_public_branch(), 'sftp://example.com')
 
280
        branch.set_public_branch('sftp://example.net')
 
281
        self.assertEqual(branch.get_public_branch(), 'sftp://example.net')
 
282
        branch.set_public_branch(None)
 
283
        self.assertEqual(branch.get_public_branch(), None)
 
284
 
274
285
    def test_record_initial_ghost(self):
275
286
        """Branches should support having ghosts."""
276
287
        wt = self.make_branch_and_tree('.')
314
325
        from bzrlib.testament import Testament
315
326
        strategy = gpg.LoopbackGPGStrategy(None)
316
327
        branch.repository.sign_revision('A', strategy)
317
 
        self.assertEqual(Testament.from_revision(branch.repository, 
318
 
                         'A').as_short_text(),
 
328
        self.assertEqual('-----BEGIN PSEUDO-SIGNED CONTENT-----\n' +
 
329
                         Testament.from_revision(branch.repository,
 
330
                         'A').as_short_text() +
 
331
                         '-----END PSUDO-SIGNED CONTENT-----\n',
319
332
                         branch.repository.get_signature_text('A'))
320
333
 
321
334
    def test_store_signature(self):
327
340
                          branch.repository.has_signature_for_revision_id,
328
341
                          'A')
329
342
        wt.commit("base", allow_pointless=True, rev_id='A')
330
 
        self.assertEqual('FOO', 
 
343
        self.assertEqual('-----BEGIN PSEUDO-SIGNED CONTENT-----\n'
 
344
                         'FOO-----END PSUDO-SIGNED CONTENT-----\n',
331
345
                         branch.repository.get_signature_text('A'))
332
346
 
333
347
    def test_branch_keeps_signatures(self):