Create Django Project (bootstrap starter template)
Run one of the 3 tests
Result: test failure
I'm using Django 1.8
Test Name: test_about
Test Outcome: Failed
Result StandardError:
======================================================================
ERROR: tearDownClass (app.tests.ViewTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Users\huvalo\AppData\Local\Continuum\Anaconda3\lib\site-packages\django\test\testcases.py", line 962, in tearDownClass
cls._rollback_atomics(cls.cls_atomics)
AttributeError: type object 'ViewTest' has no attribute 'cls_atomics'
----------------------------------------------------------------------
Ran 1 test in 0.516s
FAILED (errors=1)
I am seeing the same problem
We need to call super() in our setUpClass
Thanks int19h
Put a sample here, in case someone want to know the detail
class ViewTest(TestCase):
@classmethod
def setUpClass(cls):
super(ViewTest, cls).setUpClass()
django.setup()
Most helpful comment
We need to call
super()in oursetUpClass