'Test various functions to get individual bits of metadata'

def test_legacy_getters(self):

    old = self.init_old()
    getters = (u'path', u'abspath', u'title', u'title_sort', u'authors', u'series', u'publisher', u'author_sort', u'authors', u'comments', u'comment', u'publisher', u'rating', u'series_index', u'tags', u'timestamp', u'uuid', u'pubdate', u'ondevice', u'metadata_last_modified', u'languages')
    oldvals = {g: (tuple((getattr(old, g)(x) for x in xrange(3))) + tuple((getattr(old, g)(x, True) for x in (1, 2, 3)))) for g in getters}
    old_rows = {tuple(r)[:5] for r in old}
    old.close()
    db = self.init_legacy()
    newvals = {g: (tuple((getattr(db, g)(x) for x in xrange(3))) + tuple((getattr(db, g)(x, True) for x in (1, 2, 3)))) for g in getters}
    new_rows = {tuple(r)[:5] for r in db}
    for x in (oldvals, newvals):
        x[u'tags'] = tuple(((set(y.split(u',')) if y else y) for y in x[u'tags']))
    self.assertEqual(oldvals, newvals)
    self.assertEqual(old_rows, new_rows)
