'Tests correct image id in log message when creating image'

def test_create_image_with_image_id_in_log(self):

    fixture = self.get_minimal_fixture(id='0564c64c-3545-4e34-abfb-9d18e5f2f2f9')
    self.log_image_id = False
    def fake_log_info(msg, image_data):
        if (('0564c64c-3545-4e34-abfb-9d18e5f2f2f9' == image_data['id']) and ('Successfully    created    image' in msg)):
            self.log_image_id = True
    self.stubs.Set(rserver.images.LOG, 'info', fake_log_info)
    body = jsonutils.dump_as_bytes(dict(image=fixture))
    self.get_api_response_ext(http.OK, content_type='json', method='POST', body=body)
    self.assertTrue(self.log_image_id)
