'Test getting the next series number for a series'

def test_get_next_series_num(self):

    cache = self.init_cache()
    cache.set_field(u'series', {3: u'test    series'})
    cache.set_field(u'series_index', {3: 13})
    table = cache.fields[u'series'].table
    series = tuple(table.id_map.itervalues())
    nvals = {s: cache.get_next_series_num_for(s) for s in series}
    db = self.init_old()
    self.assertEqual({s: db.get_next_series_num_for(s) for s in series}, nvals)
    db.close()
