django.core.exceptions.ImproperlyConfigured: Requested setting DEFAULT_INDEX_TABLESPACE, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings.
pycham报错的主要原因时没有设置模型类运行 环境
需要在当前环境下对当前文件进行
运行环境配置可以参考主文件manage.py 中环境配置
// from django.test import TestCase
# Create your tests here.