'Tests getting all of the InstanceMappings for a given CellMapping id'

def test_instance_mapping_list_get_by_cell_id(self):

    inst_mapping_list = instance_mapping.InstanceMappingList.get_by_cell_id(self.context, sample_cell_mapping['id'])
    self.assertEqual(0, len(inst_mapping_list))
    db_inst_mapping1 = create_mapping()
    db_inst_mapping2 = create_mapping(cell_id=None)
    self.assertIsNone(db_inst_mapping2['cell_id'])
    inst_mapping_list = instance_mapping.InstanceMappingList.get_by_cell_id(self.context, db_inst_mapping1['cell_id'])
    self.assertEqual(1, len(inst_mapping_list))
    self.assertEqual(db_inst_mapping1['id'], inst_mapping_list[0].id)
