add some missing tests in api_test