#29966: Add test coverage for BaseHandler's "The view didn't return an 
HttpResponse
object." error
-------------------------------------+-------------------------------------
     Reporter:  ziposcar             |                    Owner:  Hasan
         Type:                       |  Ramezani
  Cleanup/optimization               |                   Status:  assigned
    Component:  HTTP handling        |                  Version:  2.1
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  1
Easy pickings:  1                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by ziposcar):

 Replying to [comment:3 Hasan Ramezani]:
 > [https://github.com/django/django/pull/10675 PR]
 >
 > It covers `FBV`:
 >
 
https://github.com/django/django/blob/d5f4ce9849b062cc788988f2600359dc3c2890cb/django/core/handlers/base.py#L119
 >
 > But I don't know how to test the `CBV`. I test some class-based view
 like this:
 >
 > {{{
 > class WithoutReponse(ListView):
 >
 >     def get(self, request):
 >         pass
 >
 > }}}
 >
 >
 > But, when I call this view,  the `callback` type is `FunctionType` and
 the `else` block doesn't execute.

 So i have the same question of CBV. And my ticket is for useless 'if' but
 not the test at first.
 I think the callback should be always FunctionType and that 'if' is
 useless.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/29966#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/066.3f91e1aca16c36218857ba002f29d4f9%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to