Update to Django 1.8 - AttributeError: django.test.TestCase has no attribute 'cls_atomics'

后端 未结 4 1286
既然无缘
既然无缘 2021-02-11 11:41

I updated a Django 1.7 project to Django 1.8 and now get errors when I run the tests (that are subclasses of django.test.TestCase).

Traceback (most          


        
4条回答
  •  忘掉有多难
    2021-02-11 12:20

    I had a similar problem where a TestCase used setUpClass but did not have a tearDownClass method. My tests pass when I add an empty one:

    @classmethod
    def tearDownClass(cls):
        pass
    

    I also do not call django.setup.

提交回复
热议问题