#21476: Cache tests make an incorrect use of `HttpRequest`
-------------------------------------+-------------------------------------
     Reporter:  unaizalakain         |                    Owner:
         Type:                       |  unaizalakain
  Cleanup/optimization               |                   Status:  assigned
    Component:  Core (Cache system)  |                  Version:  master
     Severity:  Normal               |               Resolution:
     Keywords:  tests, cache,        |             Triage Stage:  Accepted
  request                            |      Needs documentation:  0
    Has patch:  1                    |  Patch needs improvement:  1
  Needs tests:  0                    |                    UI/UX:  0
Easy pickings:  0                    |
-------------------------------------+-------------------------------------
Changes (by bmispelon):

 * cc: bmispelon (added)
 * needs_better_patch:  0 => 1
 * type:  Bug => Cleanup/optimization
 * stage:  Unreviewed => Accepted


Comment:

 Yes, it seems that the tests have accumulated some cruft over the years
 and they could use some cleaning up.
 I'm accepting the ticket on this basis.

 In particular (though the list is probably not exhaustive):
 * Use `django.test.RequestFactory` instead of manually constructing
 `HttpRequest` objects
 * Get rid of the various inconsistent `_get_request` method on the test
 cases (they have different signatures, some prepend `self.path` and others
 don't, ...)

-- 
Ticket URL: <https://code.djangoproject.com/ticket/21476#comment:3>
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/070.e77c4487bb85e9adfa0bcae294ba6657%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to