def _populate_segment_allocation_range(self, sa_range):
<EOL>id_range = xrange(sa_range['<STR_LIT>'],<EOL>sa_range['<STR_LIT>'] + <NUM_LIT:1>)<EOL>sa_dicts = []<EOL>total = <NUM_LIT:0><EOL>for i in id_range:<EOL><INDENT>sa_dicts.append({<EOL>'<STR_LIT>': sa_range['<STR_LIT>'],<EOL>'<STR_LIT>': sa_range['<STR_LIT>'],<EOL>'<STR_LIT:id>': i,<EOL>'<STR_LIT>': sa_range['<STR_LIT:id>'],<EOL>'<STR_LIT>': True<EOL>})<EOL>total = total + <NUM_LIT:1><EOL><DEDENT>db_api.segment_allocation_range_populate_bulk(self.context, sa_dicts)<EOL>self.context.session.flush()<EOL>allocs = db_api.segment_allocation_find(<EOL>self.context, segment_allocation_range_id=sa_range['<STR_LIT:id>']).all()<EOL>self.assertEqual(len(allocs), len(id_range))<EOL>
Populate a given segment range.