def test_get_int_id_from_snapshot_uuid_creates_mapping(self): smap_id = ec2utils.get_int_id_from_snapshot_uuid(self.ctxt, 'fake-uuid') smap = objects.EC2SnapshotMapping.get_by_id(self.ctxt, smap_id) self.assertEqual('fake-uuid', smap.uuid)
def test_get_int_id_from_snapshot_uuid_creates_mapping(self): smap_id = ec2utils.get_int_id_from_snapshot_uuid( self.ctxt, 'fake-uuid') smap = objects.EC2SnapshotMapping.get_by_id(self.ctxt, smap_id) self.assertEqual('fake-uuid', smap.uuid)
def test_get_int_id_from_snapshot_uuid(self): smap = objects.EC2SnapshotMapping(self.ctxt, uuid='fake-uuid') smap.create() smap_id = ec2utils.get_int_id_from_snapshot_uuid(self.ctxt, 'fake-uuid') self.assertEqual(smap.id, smap_id)
def test_get_int_id_from_snapshot_uuid(self): smap = objects.EC2SnapshotMapping(self.ctxt, uuid='fake-uuid') smap.create() smap_id = ec2utils.get_int_id_from_snapshot_uuid( self.ctxt, 'fake-uuid') self.assertEqual(smap.id, smap_id)