I am writing a unit test that needs to access an image file that I put in \"fixtures\" directory right under my django app directory. I want to open up this image file in my tes
Keep in mind that appname.__path__ is a list:
appname.__path__
import appname APP_ROOT = os.path.abspath(appname.__path__[0]) file_path = os.path.join(APP_ROOT, "some_file.txt")