Unittest in Django. Static variable feeded into the test case
- by ziang
I want to generate some dynamic data and feed these data in to test cases. But I found that Django will initial the test class every time to do the test. So the data will get generated every time django test framework calls the function.
Is there anyway to use something like the singleton or static variable to solve the problem? What should be the solution?
Thanks!