Fixed #24965 -- Made LiveServerTestCase.live_server_url accessible from class

This commit is contained in:
Moritz Sichert 2015-06-10 22:57:51 +02:00 committed by Tim Graham
parent e93e0c03b2
commit 296919e7a5
4 changed files with 64 additions and 5 deletions

View file

@ -789,6 +789,12 @@ via the :djadminopt:`--liveserver` option, for example:
$ ./manage.py test --liveserver=localhost:8082
.. versionchanged:: 1.9
In older versions ``live_server_url`` could only be accessed from an
instance. It now is a class property and can be accessed from class methods
like ``setUpClass()``.
Another way of changing the default server address is by setting the
`DJANGO_LIVE_TEST_SERVER_ADDRESS` environment variable somewhere in your
code (for example, in a :ref:`custom test runner<topics-testing-test_runner>`)::