Hi,
My app uses rest framework.
I am writing test cases which involve standard requests like GET/POST/DELETE/PUT.
What is the best approach to write the test cases ?
Should I run the web server from unit test in setUp() (by running 'python manage.py runserver') so that http
request response can work. That way I can make sure my urls.py is correctly setup.
Or is there a better way to achieve the same ?
For now am calling my rest handlers directly by passing request (of type HttpRequest()) to it.
The request object is filled with required info which the backend code expects.
Since the handlers are called directly am unable to automate tests to make sure
urls are working fine.
Please give pointers as to how this can be done.
Thanks in advance.