MCPcopy
hub / github.com/django/django / test_fail_silently_conflict

Method test_fail_silently_conflict

tests/mail/tests.py:2079–2092  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2077 # RemovedInDjango70Warning.
2078 @ignore_warnings(category=RemovedInDjango70Warning)
2079 def test_fail_silently_conflict(self):
2080 msg = (
2081 "fail_silently cannot be used with a connection. "
2082 "Pass fail_silently to get_connection() instead."
2083 )
2084 with self.assertRaisesMessage(TypeError, msg):
2085 send_mail(
2086 "Subject",
2087 "Body",
2088 "from@example.com",
2089 ["to@example.com"],
2090 fail_silently=True,
2091 connection=mail.get_connection(),
2092 )
2093
2094 # RemovedInDjango70Warning.
2095 @ignore_warnings(category=RemovedInDjango70Warning)

Callers

nothing calls this directly

Calls 3

send_mailFunction · 0.90
assertRaisesMessageMethod · 0.80
get_connectionMethod · 0.45

Tested by

no test coverage detected