Question

I'm hooking up selenose (selenium) tests and using liveserver in the process. It appears that I automatically start running into problems with ports being used so want to configure liveserver to use more that one port. I see how to do that via the command line (--liveserver=localhost:8100-8110) but would like to use a config file.

I have one I'm using for nose already and thought I might be able to reuse it but can't find anything to support that belief and my test runs say it won't work. I was expecting to be able to add something like the following:

[???] liveserver=localhost:8100-8110

but replace the '???' with an actual header.

Was it helpful?

Solution

for some reason django uses an environment variable for this. you can set it in your settings if you want

import os
os.environ['DJANGO_LIVE_TEST_SERVER_ADDRESS'] = 'localhost:8000-9000'
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top