please reopen the ticket, we are having a pain testing code that generating 
code. For instance

class A(object):
      url = "some_url"

test.py

class TestingA(LiveserverTestcase):
      def test_a()
            "we can't override the url defined in object A since its 
initialized even before we a have access to self.liveserver_url"

On Saturday, October 15, 2016 at 5:13:07 PM UTC+3, Tim Graham wrote:
>
> At the time of the implementation [0], no one raised that use case. 
> Probably we can reopen the ticket and add it back.
>
> [0] 
> https://groups.google.com/d/topic/django-developers/_TD8IkSLgqE/discussion
>
> On Saturday, October 15, 2016 at 9:32:54 AM UTC-4, Andrew Wall wrote:
>>
>> Very much appreciate the Django framework.  
>>
>> I noticed in the docs 
>> <https://docs.djangoproject.com/en/dev/releases/1.11/#liveservertestcase-binds-to-port-zero>
>>  
>> for Django 1.11 that the *DJANGO_LIVE_TEST_SERVER_ADDRESS* environmental 
>> variable is slated to be removed, along with the accompanying 
>> python manage.py test *--liveserver* option.  I'm concerned that without 
>> the ability to specify a remote IP address using --liveserver, it will no 
>> longer be possible to run functional tests using selenium against an 
>> external server.  I learned this technique from Harry Percival's excellent 
>> TDD with Python (see 
>> http://chimera.labs.oreilly.com/books/1234000000754/ch08.html#_configuring_domains_for_staging_and_live),
>>  
>> where the test command is called from the local machine but you pass in the 
>> external IP.  Will there be a different way to do this in Django 1.11? 
>> Perhaps the change to bind LiveserverTestCase to port zero by default can 
>> be made while retaining the option to pass in --liveserver?  Realize the 
>> release is a ways away but would appreciate any help as I've come to rely 
>> on this method to test server deployments.  Thank you!
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/b74d3aa2-a033-4f98-a558-cdbbd68717d3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to