#24721: Introduce something similar to mail.outbox for messages
----------------------------------+--------------------------------------
     Reporter:  mjtamlyn          |                    Owner:  nobody
         Type:  New feature       |                   Status:  new
    Component:  contrib.messages  |                  Version:  master
     Severity:  Normal            |               Resolution:
     Keywords:                    |             Triage Stage:  Unreviewed
    Has patch:  0                 |      Needs documentation:  0
  Needs tests:  0                 |  Patch needs improvement:  0
Easy pickings:  0                 |                    UI/UX:  0
----------------------------------+--------------------------------------

Comment (by mjtamlyn):

 An overridden test runner works very well for changing the test
 environment (changing settings for example), but it doesn't allow for
 wrapping tests. I personally am not a huge fan of the following pattern:

 {{{
 MyTestMixins(object):
     def _pre_setup(self):
         redis.clear()
         queue.clear()
         messages.outbox = []
         ...

 MyTestCase(MyTestMixins, TestCase)
 MyTransactionTestCase(MyTestMixins, TestCase)
 MyLiveServerTestCase(MyTestMixins, MyLiveServerTestCase)
 ...
 }}}

--
Ticket URL: <https://code.djangoproject.com/ticket/24721#comment:2>
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.32fd85983a05157f69c568a690a9b98a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to