mirror of
https://github.com/django/django.git
synced 2025-08-03 10:34:04 +00:00
Fixed #24965 -- Made LiveServerTestCase.live_server_url accessible from class
This commit is contained in:
parent
e93e0c03b2
commit
296919e7a5
4 changed files with 64 additions and 5 deletions
|
@ -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>`)::
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue