[#8559] simplify some api test setup
2 files changed