Unittest in Django. Static variable feeded into the test case
Posted
by ziang
on Stack Overflow
See other posts from Stack Overflow
or by ziang
Published on 2010-04-05T19:35:50Z
Indexed on
2010/04/05
20:03 UTC
Read the original article
Hit count: 148
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!
© Stack Overflow or respective owner