#14543: ContentTypes tests fails if auth app is not installed
----------------------------------------+-----------------------------------
               Reporter:  sayane        |         Owner:  dmoisset
                 Status:  new           |     Milestone:  1.3     
              Component:  Contrib apps  |       Version:  SVN     
             Resolution:                |      Keywords:          
           Triage Stage:  Accepted      |     Has patch:  1       
    Needs documentation:  0             |   Needs tests:  0       
Patch needs improvement:  1             |  
----------------------------------------+-----------------------------------
Changes (by russellm):

  * needs_better_patch:  0 => 1


Comment:

 I'm not convinced the approach taken by the patch is correct. auth is
 being used here because we need a model on which to invoke shortcut(), and
 auth is a generally reliable option.

 However, auth isn't always available, so we just need to find a
 substitute. Turns out you can actually define a model in tests.py, and
 that model will be available during testing, but not in production. This
 avoids the need to create a second test module for contenttype tests. It
 also provides an opportunity to test aspects of shortcut() that aren't
 currently tested -- testing models that *don't* have get_absolute_url
 defined.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/14543#comment:10>
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 django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to