'Tests proper exception is raised if a bad status is set'

def test_create_image_with_bad_status(self):

    fixture = self.get_minimal_fixture(id=_gen_uuid(), status='bad    status')
    body = jsonutils.dump_as_bytes(dict(image=fixture))
    res = self.get_api_response_ext(http.BAD_REQUEST, body=body, method='POST', content_type='json')
    self.assertIn('Invalid    image    status', res.body)
