I have a few functional tests for an app I am developing. For every test, I need to create an admin user, and then also a few profiles of users of the app. Creating the admin and the user profiles does not take too long if you are running one test only, but it adds up when I run all tests, which is required every time we add a new feature to the add.
I have a Python file with the following:
import unittest, sys
from django.conf import settings
print("DEV_ENV: "+str(settings.DEV_ENV))
print("TEST_ENV: "+str(settings.TEST_ENV))
print("PROD_ENV: "+str(settings.PROD_ENV))
from case1test import Case1Test
from case2test import Case2Test
from case3test import Case3Test
from case4test import Case4Test
if __name__ == '__main__':
unittest.main()
I would like to create the admin and user profiles ONCE for all functional tests. Can someone give me some advice on how to proceed? The app is developed using Django 1.6, so the --keepdb option is not available.