【发布时间】:2017-10-13 20:57:43
【问题描述】:
django.test.TestCase 和 rest_framework.test.APITestCase 这些测试类的主要区别是什么。哪个更好测试我的 views.py ?
你能建议我了解这些文件吗?
提前谢谢你。 :-)
【问题讨论】:
-
据我所知,django 中没有 APITestCase。使用 rest_framework.test.APITestCase
-
对不起,我修改了我的问题。 rest_framework 中的 APITestCase 和 Django 中的 TestCase
标签: python-3.x unit-testing django-rest-framework django-testing web-api-testing