Django test api while api is running in dev environment
I have a Django project in Dev Env. I can run the api with 'python manage.py runserver'
I can run the tests with 'python manage.py rest api.tests'
But only one at a time. When I run tests the api is not running. How can I run tests when api is running?
You can't run the tests and api at the same time, with same command. You can run the server using python manage.py runserver.
You can run all tests at once using python manage.py tests.
Instead, you can write the tests and compare them manually in a single api and create django command to run that api. But that is not advisable.