~didrocks/unity/altf10

« back to all changes in this revision

Viewing changes to grackle/tests/test_client.py

  • Committer: Curtis Hovey
  • Date: 2012-01-30 21:34:10 UTC
  • mto: This revision was merged to the branch mainline in revision 37.
  • Revision ID: curtis.hovey@canonical.com-20120130213410-2aluhaj4pv807w1e
Use the exception __doc__ to ensure client and server can match exceptions.

Show diffs side-by-side

added added

removed removed

Lines of Context:
226
226
                self.send_response(httplib.OK)
227
227
                self.end_headers()
228
228
                self.wfile.write(simplejson.dumps(response))
 
229
            except UnsupportedOrder:
 
230
                self.send_response(
 
231
                    httplib.BAD_REQUEST, UnsupportedOrder.__doc__)
 
232
                return
229
233
            except UnsupportedDisplayType:
230
234
                self.send_response(
231
 
                    httplib.BAD_REQUEST, 'Unsupported display_type')
232
 
                return
233
 
            except UnsupportedOrder:
234
 
                self.send_response(
235
 
                    httplib.BAD_REQUEST, 'Unsupported order')
 
235
                    httplib.BAD_REQUEST, UnsupportedDisplayType.__doc__)
236
236
                return
237
237
 
238
238
    def log_message(self, format, *args):