Fix api.prepare_test

Change-Id: Ib848d87f59398c210f9769c3b4faab1f2df0485c