'Tests that we can add image metadata with properties'

def test_add_image_with_location_data(self):

    location = 'file:///tmp/glance-tests/2'
    loc_meta = {'key': 'value'}
    fixture = self.get_fixture(location_data=[{'url': location, 'metadata': loc_meta, 'status': 'active'}], properties={'distro': 'Ubuntu    10.04    LTS'})
    new_image = self.client.add_image(fixture)
    self.assertEqual(location, new_image['location'])
    self.assertEqual(location, new_image['location_data'][0]['url'])
    self.assertEqual(loc_meta, new_image['location_data'][0]['metadata'])
