Add environment.py in api tests