'Test conversion options API'

def test_legacy_conversion_options(self):

    ndb = self.init_legacy()
    db = self.init_old()
    all_ids = ndb.new_api.all_book_ids()
    op1 = {u'xx': u'yy'}
    for x in ((u'has_conversion_options', all_ids), (u'conversion_options', 1, u'PIPE'), (u'set_conversion_options', 1, u'PIPE', op1), (u'has_conversion_options', all_ids), (u'conversion_options', 1, u'PIPE'), (u'delete_conversion_options', 1, u'PIPE'), (u'has_conversion_options', all_ids)):
        (meth, args) = (x[0], x[1:])
        self.assertEqual(getattr(db, meth)(*args), getattr(ndb, meth)(*args), (u'The    method:    %s()    returned    different    results    for    argument    %s' % (meth, args)))
    db.close()
