Improves API tests so they no longer use curl