Ptvs: Test failure in django project

Created on 24 Apr 2015  路  3Comments  路  Source: microsoft/PTVS

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)

Templates bug help wanted

Most helpful comment

We need to call super() in our setUpClass

All 3 comments

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()

Was this page helpful?
0 / 5 - 0 ratings