updated to properly mock os.environ