django.core.exceptions.ImproperlyConfigured: Requested setting CACHES, but settings are not configured. You must either define the environment varia

前端 未结 8 1848
遇见更好的自我
遇见更好的自我 2020-12-28 14:46

I\'ve tried everything that I could find to fix this issue, and I\'m starting to tear my hair out a little. I\'m getting this error:

django.core.exceptions.I         


        
8条回答
  •  轮回少年
    2020-12-28 14:54

    I got this error when I imported TestCase from unittest2. I fixed it by importing TestCase by:

    from django.test import TestCase
    

    My suspicions were raised when the test was labelled "Unittest" rather than "Test". I had to run the whole suite before Pycharm realised I'd made this change...

提交回复
热议问题