#35528: Added "body_contains" method to "EmailMultiAlternatives"
---------------------------------------+------------------------
               Reporter:  Ron          |          Owner:  nobody
                   Type:  New feature  |         Status:  new
              Component:  Core (Mail)  |        Version:  dev
               Severity:  Normal       |       Keywords:  email
           Triage Stage:  Unreviewed   |      Has patch:  0
    Needs documentation:  0            |    Needs tests:  0
Patch needs improvement:  0            |  Easy pickings:  0
                  UI/UX:  0            |
---------------------------------------+------------------------
 Currently, it's very hard and tedious to assert the content of an email
 object. Therefore, we want to add a method "body_contains()" to
 "EmailMultiAlternatives" to check a search string in all available text-
 based alternatives (content parts, like HTML).

 This method can then be easily asserted in any given unit-test.

 There's a forum discussion going on about this topic:
 https://forum.djangoproject.com/t/improve-email-unit-testing/32044/1

 I've already created a PR for a suggetion:
 https://github.com/django/django/pull/18278/files
-- 
Ticket URL: <https://code.djangoproject.com/ticket/35528>
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107019026bfb159-379ae5b0-ab83-4d50-8534-7781488b8049-000000%40eu-central-1.amazonses.com.

Reply via email to