Re: How start django server automatically using pytest-django

2018-07-11 Thread 'Anthony Flury' via Django users
On 07/07/18 13:16, prakash sharma wrote: RE:'do you want to test on development server' NO, Drone is running the test cases.I don't want to run the runserver command. But why do you need the server running - the Django Test client is able to test views and responses without having to have the

Re: How start django server automatically using pytest-django

2018-07-07 Thread prakash sharma
RE:'do you want to test on development server' NO, Drone is running the test cases.I don't want to run the runserver command. On Saturday, July 7, 2018 at 5:12:51 PM UTC+5:30, Kamal Sharma wrote: > > do you want to test on development server?? > > > On Sat, Jul 7, 2018 at 1:17 PM, prakash sharma

Re: How start django server automatically using pytest-django

2018-07-07 Thread prakash sharma
@Mikhailo I agree, that we should not use requests. But then what is point of using pytest-django then?? I am using pytest-django with the hope that it will manage and restart the server itself. On Saturday, July 7, 2018 at 4:41:25 PM UTC+5:30, Mikhailo Keda wrote: > > read more about testing

Re: How start django server automatically using pytest-django

2018-07-07 Thread Kamal Sharma
do you want to test on development server?? On Sat, Jul 7, 2018 at 1:17 PM, prakash sharma wrote: > Hi there, > I am facing issue that my django server is not started . > I want to run the pytest-django for test cases without manual runserver. > > Here is my test file: > > import requests

Re: How start django server automatically using pytest-django

2018-07-07 Thread Mikhailo Keda
there is an example - https://bitbucket.org/voron-raven/tools-site/src/master/tool/tests/tests_views.py > to run tests: python manage.py test -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving ema

Re: How start django server automatically using pytest-django

2018-07-07 Thread Mikhailo Keda
read more about testing - https://docs.djangoproject.com/en/2.0/topics/testing/ you don't need to use requests, use testing client instead - https://docs.djangoproject.com/en/2.0/topics/testing/tools/#making-requests -- You received this message because you are subscribed to the Google Groups

How start django server automatically using pytest-django

2018-07-07 Thread prakash sharma
Hi there, I am facing issue that my django server is not started . I want to run the pytest-django for test cases without manual runserver. Here is my test file: import requests def test_demo(): response = requests.get('http://0.0.0.0:8000/' + "demo") assert (response.st