# TestCase 基类的使用
django.test.TestCase # 测试依赖于数据库访问,创建或查询模型 unittest.TestCase #没有与数据库交互 避免刷新数据库的成本
python django的单元测试
原文:https://www.cnblogs.com/shmily3929/p/9828774.html