#28224: Test suite exception catching is not always specific
-------------------------------------+-------------------------------------
               Reporter:  Mads       |          Owner:  nobody
  Jensen                             |
                   Type:             |         Status:  new
  Cleanup/optimization               |
              Component:  Core       |        Version:  master
  (Other)                            |
               Severity:  Normal     |       Keywords:  exception classes
           Triage Stage:             |      Has patch:  0
  Unreviewed                         |
    Needs documentation:  0          |    Needs tests:  0
Patch needs improvement:  0          |  Easy pickings:  0
                  UI/UX:  0          |
-------------------------------------+-------------------------------------
 `tests/requests/tests.py` contains some less specific tests. Actually,
 it's `DisallowedHost` that's being raised instead for all of these cases.
 Isn't it better in general to test for the actual exception class?
 Probably there are other cases of tests like this that could be made more
 specific.

 {{{
 with self.assertRaises(SuspiciousOperation):
 }}}

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

Reply via email to