'A test to ensure that an image with size explicitly set to zero
has status that immediately transitions to active.'

def test_zero_initial_size(self):

    headers = {'Content-Type': 'application/octet-stream', 'X-Image-Meta-Size': '0', 'X-Image-Meta-Name': 'Image1', 'X-Image-Meta-disk_format': 'raw', 'X-image-Meta-container_format': 'ovf', 'X-Image-Meta-Is-Public': 'True'}
    path = '/v1/images'
    (response, content) = self.http.request(path, 'POST', headers=headers)
    self.assertEqual(http_client.CREATED, response.status)
    image = jsonutils.loads(content)['image']
    self.assertEqual('active', image['status'])
    path = response.get('location')
    (response, content) = self.http.request(path, 'HEAD')
    self.assertEqual(http_client.OK, response.status)
    self.assertEqual('0', response['x-image-meta-size'])
    self.assertEqual('active', response['x-image-meta-status'])
    (response, content) = self.http.request(path, 'GET')
    self.assertEqual(http_client.OK, response.status)
    self.assertEqual(0, len(content))
