'Test delete_using() API'

def test_legacy_delete_using(self):

    ndb = self.init_legacy()
    db = self.init_old()
    cache = ndb.new_api
    tmap = cache.get_id_map(u'tags')
    t = next(tmap.iterkeys())
    pmap = cache.get_id_map(u'publisher')
    p = next(pmap.iterkeys())
    run_funcs(self, db, ndb, ((u'delete_tag_using_id', t), (u'delete_publisher_using_id', p), (db.refresh,), (u'all_tag_names',), (u'tags', 0), (u'tags', 1), (u'tags', 2), (u'all_publisher_names',), (u'publisher', 0), (u'publisher', 1), (u'publisher', 2)))
    db.close()
