/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: Jelmer Vernooij
  • Date: 2019-06-03 23:48:08 UTC
  • mfrom: (7316 work)
  • mto: This revision was merged to the branch mainline in revision 7328.
  • Revision ID: jelmer@jelmer.uk-20190603234808-15yk5c7054tj8e2b
Merge trunk.

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(