#28212: Allow customizing the port that LiveServerTestCase uses
--------------------------------------+------------------------------------
Reporter: Robert Rollins | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Testing framework | Version: 1.11
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Comment (by Simon Charette):
> Hmm, never written a test for django before. How should I go about that?
I suggest you add a test method to
[https://github.com/django/django/blob/650bf6714d5648811a8bc08ce53b7fa86cc38d40/tests/servers/tests.py#L122
tests.servers.tests. LiveServerPort] which finds an available port, set it
as an attribute to dynamically a create `LiveServerBase` subclass (look at
`test_port_bind` for that), call `setUpClass()` on it and assert
`TestClass.live_server_url` contains the specified port.
--
Ticket URL: <https://code.djangoproject.com/ticket/28212#comment:4>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/071.a2add5c836d16eddded118406c99025a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.