'Tests that exception raised trying to set a bad status'

def test_update_image_with_bad_status(self):

    fixture = {'status': 'invalid'}
    body = jsonutils.dump_as_bytes(dict(image=fixture))
    res = self.get_api_response_ext(http.BAD_REQUEST, method='PUT', body=body, url=('/images/%s' % UUID2), content_type='json')
    self.assertIn('Invalid    image    status', res.body)
