#12089: test client fails to collect sub-contexts
---------------------------------------------+------------------------------
          Reporter:  akaihola                |         Owner:  nobody           
          
            Status:  new                     |     Milestone:                   
          
         Component:  Testing framework       |       Version:  SVN              
          
        Resolution:                          |      Keywords:  template context 
TestClient
             Stage:  Design decision needed  |     Has_patch:  1                
          
        Needs_docs:  0                       |   Needs_tests:  0                
          
Needs_better_patch:  0                       |  
---------------------------------------------+------------------------------
Comment (by akaihola):

 Replying to [comment:10 russellm]:
 > I can see what you're trying to do, and the patch makes sense - my
 concern is the potential for backwards incompatibility. Any template that
 has a 'with' and 'include' will suddenly acquire a whole lot more contexts
 in the test output; if you're testing the number of contexts, or if the
 subcontext introduces a variable that wasn't previously being tested
 against, you could start to get test failures (or worse, false passes).

 Ok. What about these alternatives:

  1. point out the current behavior in the documentation
  2. provide a test client option to activate collecting sub-contexts
  3. add an additional `response.deep_context` attribute and do complete
 context collection with sub-contexts there
  4. wait until Django 2.0 and make this change then

 How severe is backwards incompatibility in the test framework? It wouldn't
 break production websites after all.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/12089#comment:11>
Django <http://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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to