corrected apitest.py