Re: Best approach to write unit tests involving rest apis.

2015-12-03 Thread Xavier Ordoquy
> Le 3 déc. 2015 à 08:08, learn django > a écrit : > > On Wednesday, December 2, 2015 at 10:48:52 PM UTC-8, Xavier Ordoquy wrote: > Hi, > > > Le 3 déc. 2015 à 00:12, learn django > > > a écrit : > > > > My app uses rest framework. > > I am writing test c

Re: Best approach to write unit tests involving rest apis.

2015-12-02 Thread learn django
On Wednesday, December 2, 2015 at 10:48:52 PM UTC-8, Xavier Ordoquy wrote: > > Hi, > > > Le 3 déc. 2015 à 00:12, learn django > a écrit : > > > > My app uses rest framework. > > I am writing test cases which involve standard requests like > GET/POST/DELETE/PUT. > > What is the best approach

Re: Best approach to write unit tests involving rest apis.

2015-12-02 Thread Xavier Ordoquy
Hi, > Le 3 déc. 2015 à 00:12, learn django a écrit : > > 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 ? Django REST framework comes with a test client named APIClient. It wi

Best approach to write unit tests involving rest apis.

2015-12-02 Thread learn django
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