/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 breezy/tests/test_smart.py

  • Committer: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2019-06-02 06:03:07 UTC
  • mfrom: (7309.1.1 merge-3.0)
  • Revision ID: breezy.the.bot@gmail.com-20190602060307-k1s62fxuqo4gtgkg
Merge the 3.0 branch.

Merged from https://code.launchpad.net/~jelmer/brz/merge-3.0/+merge/368233

Show diffs side-by-side

added added

removed removed

Lines of Context:
905
905
        self.assertEqual(smart_req.SmartServerResponse((b'ok', b'0')),
906
906
                         request.execute(b'', b'null:'))
907
907
 
 
908
    def test_ghost_revision(self):
 
909
        backing = self.get_transport()
 
910
        request = smart_branch.SmartServerBranchRequestRevisionIdToRevno(
 
911
            backing)
 
912
        branch = self.make_branch('.')
 
913
        def revision_id_to_dotted_revno(revid):
 
914
            raise errors.GhostRevisionsHaveNoRevno(revid, b'ghost-revid')
 
915
        self.overrideAttr(branch, 'revision_id_to_dotted_revno', revision_id_to_dotted_revno)
 
916
        self.assertEqual(
 
917
            smart_req.FailedSmartServerResponse(
 
918
                (b'GhostRevisionsHaveNoRevno', b'revid', b'ghost-revid')),
 
919
            request.do_with_branch(branch, b'revid'))
 
920
 
908
921
    def test_simple(self):
909
922
        backing = self.get_transport()
910
923
        request = smart_branch.SmartServerBranchRequestRevisionIdToRevno(