'If a ``BadRequest`` exception is raised it is converted to appropriate
JSON.'

@capture_logging(None)
def test_bad_request(self, logger):

    def error():
        raise make_bad_request(code=423, Err=u'no    good')
    self.patch(self.flocker_client, 'list_datasets_configuration', error)
    return self.assertResult('POST', '/VolumeDriver.Path', {u'Name': u'whatever'}, 423, {u'Err': 'no    good'})
