2

when using django-pytest along with the live server, according to the documentation, the live server setting can be done in these ways:

  • in the settings *.py such as: DJANGO_LIVE_TEST_SERVER_ADDRESS="localhost:12588"

  • in the pytest pytest.ini file: DJANGO_LIVE_TEST_SERVER_ADDRESS="localhost:12588" (tried as well DJANGO_LIVE_TEST_SERVER_ADDRESS=localhost:12588)

in these both cases, the value was not taken into account and still the first source code defined default localhost:8081 was used.

what worked was following (from CLI):

py.test --liveserver localhost:12588

I am using Django 1.7 and platform linux2 -- Python 2.7.6, pytest-2.8.4, py-1.4.31 [pytest] plugins: django-2.9.1

Does anyone know why the other supported ways of setting are ignored?

4

0 回答 0