~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/smart/request.py

  • Committer: Andrew Bennetts
  • Date: 2009-02-11 09:54:36 UTC
  • mto: This revision was merged to the branch mainline in revision 4002.
  • Revision ID: andrew.bennetts@canonical.com-20090211095436-96dwxqkzc79iybxy
Add a test that unexpected request bodies trigger a SmartProtocolError from request implementations.

Show diffs side-by-side

added added

removed removed

Lines of Context:
105
105
        Must return a SmartServerResponse.
106
106
        """
107
107
        if body_bytes != '':
108
 
            raise SmartProtocolError('Request does not expect a body.')
 
108
            raise errors.SmartProtocolError('Request does not expect a body')
109
109
 
110
110
    def do_chunk(self, chunk_bytes):
111
111
        """Called with each body chunk if the request has a streamed body.