What is the major difference in these test classes django.test.TestCase and rest_framework.test.APITestCase . which is Better to test my views.py ?
can you suggest me documentations to understand about these.
Thank you in advance. :-)
Difference between rest_framework.test.APITestCase and django.test.testcases.TestCase in HTTP Client they use (source: github).
With rest_framework APIClient it easier to test API than with Django Client. For example, less work with json responses. See more: http://www.django-rest-framework.org/api-guide/testing/
APITestCase in rest_framework.test is to test the api's in the rest. It is specific for the api operations and api calls. Django.test.TestCase is used to test the Django classes.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With