Opened 2 hours ago

#37132 assigned Bug

Replaced Python 2-style super() call in SafeMIMEText.set_payload()

Reported by: anisia19 Owned by: anisia19
Component: Core (Mail) Version: dev
Severity: Normal Keywords:
Cc: anisia19 Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

SafeMIMEText.set_payload() in django/core/mail/message.py calls MIMEText.set_payload(self, payload, charset = charset), passing self explicitly as an unbound method call, a Python 2 idiom. This causes issues when is mocked with autospec, since self is then passed twice (once by the mock and once explicitly)

Change History (0)

Note: See TracTickets for help on using tickets.
Back to Top